chown -R www-data:www-data /opt/rt4/var/mason_data/*<div><br></div><div>I know it's more of a "patch" than a "fix", but.. this is how I'm handling this problem on my end (yea, I ran into it too), and unless I manually remove the mason_data info, it seems to solve my problems. That's just how I've solved it.. I'm sure there's better ways probably.<br>
<br><div class="gmail_quote">On Thu, May 26, 2011 at 12:49 PM, Asif Iqbal <span dir="ltr"><<a href="mailto:vadud3@gmail.com">vadud3@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Thu, May 26, 2011 at 12:01 PM, Kevin Falcone<br>
<<a href="mailto:falcone@bestpractical.com">falcone@bestpractical.com</a>> wrote:<br>
> On Thu, May 26, 2011 at 11:37:24AM -0400, Asif Iqbal wrote:<br>
>> root@lucid:/opt/rt4/var/mason_data# ls -al<br>
>> total 4<br>
>> drwxrwx--- 4 www-data www-data 1024 2011-05-25 17:21 .<br>
>> drwxr-xr-x 5 root root 1024 2011-05-20 12:42 ..<br>
>> drwxr-xr-x 2 root root 1024 2011-05-25 17:21 cache<br>
>> drwxr-xr-x 2 root root 1024 2011-05-25 17:21 obj<br>
>> I need help to find out why mason_data/{cache,obj} are owned by root.<br>
>> I removed the dirs and restarted apache2 and they come back with root<br>
>> as the owner<br>
><br>
> Check your apache config. Mostly likely you're loading the RT configs<br>
> before the User/Group lines which means the initial setup gets done as<br>
> root instead the web user.<br>
<br>
</div>root@lucid:/etc/apache2# cat /etc/apache2/envvars<br>
...<br>
export APACHE_RUN_USER=www-data<br>
export APACHE_RUN_GROUP=www-data<br>
...<br>
<br>
root@lucid:/etc/apache2# egrep -n "^User|^Group" apache2.conf<br>
145:User ${APACHE_RUN_USER}<br>
146:Group ${APACHE_RUN_GROUP}<br>
<br>
root@lucid:/etc/apache2# grep -n ^Include apache2.conf<br>
204:Include /etc/apache2/mods-enabled/*.load<br>
205:Include /etc/apache2/mods-enabled/*.conf<br>
208:Include /etc/apache2/httpd.conf<br>
211:Include /etc/apache2/ports.conf<br>
233:Include /etc/apache2/conf.d/<br>
236:Include /etc/apache2/sites-enabled/<br>
<br>
User is defined on line 145 and on line 236<br>
/etc/apache2/sites-enabled/ dir is included.<br>
<br>
Here is the conf for webrt. So it is included after User and Group are defined<br>
<br>
root@lucid:/etc/apache2# cat /etc/apache2/sites-enabled/webrt<br>
<VirtualHost *:80><br>
### Optional apache logs for RT<br>
ErrorLog /var/log/apache2/rt.error<br>
TransferLog /var/log/apache2/rt.access<br>
LogLevel debug<br>
<br>
AddDefaultCharset UTF-8<br>
<br>
DocumentRoot "/opt/rt4/share/html"<br>
<Location /><br>
Order allow,deny<br>
Allow from all<br>
<br>
SetHandler perl-script<br>
PerlResponseHandler Plack::Handler::Apache2<br>
PerlSetVar psgi_app /opt/rt4/sbin/rt-server<br>
</Location><br>
<Perl><br>
use Plack::Handler::Apache2;<br>
Plack::Handler::Apache2->preload("/opt/rt4/sbin/rt-server");<br>
</Perl><br>
</VirtualHost><br>
<div><div></div><div class="h5"><br>
><br>
> -kevin<br>
><br>
>> root@lucid:/opt/rt4/var/mason_data# /etc/init.d/apache2 stop<br>
>> * Stopping web server apache2<br>
>> ... waiting ...........<br>
>><br>
>> [ OK ]<br>
>> root@lucid:/opt/rt4/var/mason_data# ls -al<br>
>> total 4<br>
>> drwxrwx--- 4 www-data www-data 1024 2011-05-25 17:21 .<br>
>> drwxr-xr-x 5 root root 1024 2011-05-20 12:42 ..<br>
>> drwxr-xr-x 2 root root 1024 2011-05-25 17:21 cache<br>
>> drwxr-xr-x 2 root root 1024 2011-05-25 17:21 obj<br>
>> root@lucid:/opt/rt4/var/mason_data# rm -rf cache obj<br>
>> root@lucid:/opt/rt4/var/mason_data# ls -al<br>
>> total 2<br>
>> drwxrwx--- 2 www-data www-data 1024 2011-05-26 11:34 .<br>
>> drwxr-xr-x 5 root root 1024 2011-05-20 12:42 ..<br>
>> root@lucid:/opt/rt4/var/mason_data# /etc/init.d/apache2 start<br>
>> * Starting web server apache2<br>
>> [ OK ]<br>
>> root@lucid:/opt/rt4/var/mason_data# ls -al<br>
>> total 4<br>
>> drwxrwx--- 4 www-data www-data 1024 2011-05-26 11:34 .<br>
>> drwxr-xr-x 5 root root 1024 2011-05-20 12:42 ..<br>
>> drwxr-xr-x 2 root root 1024 2011-05-26 11:34 cache<br>
>> drwxr-xr-x 2 root root 1024 2011-05-26 11:34 obj<br>
>> root@lucid:/opt/rt4/var/mason_data# ps -ef | grep apache2<br>
>> root 2192 1 27 11:34 ? 00:00:04 /usr/sbin/apache2 -k start<br>
>> www-data 2195 2192 0 11:34 ? 00:00:00 /usr/sbin/apache2 -k start<br>
>> root 2198 1367 0 11:34 pts/0 00:00:00 grep --color=auto apache2<br>
>> root@lucid:/opt/rt4/var/mason_data# ps -ef | grep apache2<br>
>> root 2192 1 20 11:34 ? 00:00:05 /usr/sbin/apache2 -k start<br>
>> www-data 2195 2192 0 11:34 ? 00:00:00 /usr/sbin/apache2 -k start<br>
>> www-data 2199 2192 2 11:34 ? 00:00:00 /usr/sbin/apache2 -k start<br>
>> www-data 2200 2192 2 11:34 ? 00:00:00 /usr/sbin/apache2 -k start<br>
>> root 2256 1367 0 11:34 pts/0 00:00:00 grep --color=auto apache2<br>
>> root@lucid:/opt/rt4/var/mason_data#<br>
>><br>
>><br>
>> --<br>
>> Asif Iqbal<br>
>> PGP Key: 0xE62693C5 KeyServer: <a href="http://pgp.mit.edu" target="_blank">pgp.mit.edu</a><br>
>> A: Because it messes up the order in which people normally read text.<br>
>> Q: Why is top-posting such a bad thing?<br>
><br>
<br>
<br>
<br>
--<br>
Asif Iqbal<br>
PGP Key: 0xE62693C5 KeyServer: <a href="http://pgp.mit.edu" target="_blank">pgp.mit.edu</a><br>
A: Because it messes up the order in which people normally read text.<br>
Q: Why is top-posting such a bad thing?<br>
</div></div></blockquote></div><br></div>