1

I'm setting up a vhost with ftp access.

I've a FTP user ftpuser, which is chrooted to its home directory, then I set up the vhost making it point to /home/ftpuser/.

I've added ftpuser to www-data group, I also made sure by running groups ftpuser that returns ftpuser: ftpuser www-data.

Then I uploaded a wordpress website, ran chown -R ftpuser:www-data on the whole source directory, set file permissions to 664 for .php files and 775 for directories. Unfortunatly this settings are not working, in fact Apache has no permissions over that files. It only gains permissions to execute and write when i set permissions to 666 (for files) and 777 (for directories). It seems like the www-data group has not been grant of any permission (in fact it's not using the group permissions).

How can I fix that? What's wrong here? I'm sure apache uses www-data since I've looked at its configuration and I also ran ps aux | grep apache.

P.S. ftpuser will be accessed via vsftpd, do I need to edit something to make sure new files will have the www-data group? (umask is 022)

1 Answer 1

0

Most Linux distros these days make the home directory 700 for security reasons. You want to change that to at least 710

chmod 710 /home/ftpuser

That way apache can cd into /home/ftpuser and from your permissions.. it should be able to read the php files just fine

1
  • Thanks, but my home directory is set to be 0755 (drwxr-sr-x) but it's still not working if I don't set permissions for others (non owner and non group users) Sep 5, 2012 at 13:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .