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)