| View previous topic :: View next topic |
| Author |
Message |
boblu n00b

Joined: 12 Oct 2006 Posts: 40
|
Posted: Fri May 23, 2008 4:21 am Post subject: [Solved] File permission problem with apache2 |
|
|
I am running wordpress with apache2 on my gentoo box.
When I tried using the built-in theme editor of WP, I met the following problem of file permission.
my www root directory was changed to /home/boblu/www_root
and my WP root directory is /home/boblu/www_root/wordpress
and the ownership of all files under www_root is boblu:boblu
Because in gentoo, the user of apache2 is apache
so in order to let the browser have the permission to write files in /home/boblu/www_root/wordpress/wp-content/theme/k2
I did the following two things.
First, add apache user to boblu group
| Code: | | root# usermod -a -G boblu apache |
Second, make the k2 directory writable by group users
| Code: | | boblu$ chmod -R g+w /home/boblu/www_root/wordpress/wp-content/theme/k2 |
But the problem is, after doing these, I still can not get the write permission by using browser.
Anyway, if I change the permission of k2 directory public writable, the files become writable by using browser.
| Code: | | boblu$ chmod -R go+w /home/boblu/www_root/wordpress/wp-content/theme/k2 |
Also, I found if I change the ownership of k2 directory to boblu:apache, and give them group writable permission, the files become writable by using browser too.
| Code: |
root# chown -R boblu:apache /home/boblu/www_root/wordpress/wp-content/theme/k2
boblu$ chmod -R g+w /home/boblu/www_root/wordpress/wp-content/theme/k2 |
This is strange!
Dose this mean that Apache2 run as a user other than 'apache' but this user is still in 'apache' group?
Can anybody explain this? _________________ I like my G!
Last edited by boblu on Sun May 25, 2008 2:31 am; edited 1 time in total |
|
| Back to top |
|
 |
aceFruchtsaft Guru


Joined: 16 May 2004 Posts: 434 Location: Vienna, Austria
|
Posted: Sat May 24, 2008 6:16 pm Post subject: |
|
|
Did you restart apache after adding it to the boblu group? When adding real users to groups you have to login again for the changes to become effective, so maybe it's the same with the apache process.
BTW, you can easily determinde the effective user and group of apache with something like
| Code: |
ps -C apache2 -o euser,egroup,cmd |
|
|
| Back to top |
|
 |
boblu n00b

Joined: 12 Oct 2006 Posts: 40
|
Posted: Sun May 25, 2008 2:31 am Post subject: |
|
|
yeah, I should have re-loggin and restart apache to test the result.
This is working.
Thank you very much for your advices. _________________ I like my G! |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|