Page 1 of 1

chown apache:apache

Posted: 21 Feb 2010, 16:20
by zander
hi,

while setting up wordpress on my b2 it was suggested that /home/web/wordpress ownership be changed with "chown apache:apache" i tried this command but got the following result...

Code: Select all

bubba:/home/web# chown apache2:apache2 wordpress
chown: `apache2:apache2': invalid user
please advise.

Re: chown apache:apache

Posted: 21 Feb 2010, 18:10
by RandomUsername
There would need to be a user set up called apache2.

I don't have one on my B2 so I assume you don't have one either.

Do this in a SSH session:

Code: Select all

cat /etc/passwd | grep -i apache
I think the apache username on the B2 is www-data. I definitely have that user in my passwd file.

Re: chown apache:apache

Posted: 21 Feb 2010, 18:26
by zander
hi,

it looks like your are right...

Code: Select all

bubba:/home/af# cat /etc/passwd | grep -i apache
bubba:/home/af# cd /home/web
bubba:/home/web# ls -la
total 20
drwxrwxr-x 3 admin    users    4096 2010-02-21 12:15 .
drwxr-xr-x 7 root     root     4096 2010-02-21 11:34 ..
-rw-rw-rw- 1 root     root       35 2010-02-21 13:26 .htaccess
-rw-r--r-- 1 root     root      408 2010-02-21 02:47 index.php
drwxr-xr-x 5 www-data www-data 4096 2010-02-21 03:11 wordpress
bubba:/home/web# 
www-data already owns wordpress.

so there is no need to adjust the ownership.