Pure-FTPD accounts and permissions for websites
- by EddyR
I'm having trouble setting up the appropriate Pure-FTPD accounts and permissions - I have the following sites setup up on my Debian server.
/var/www/site1
/var/www/site2
/var/www/wordpress
The permissions are 775 for folders and 664 for files. The owner is currently admin:ftpgroup
Wordpress also requires special permissions for file uploads in
/var/www/wordpress/wp-content/uploads
What I need is:
a general admin group with access to /var/www
a group for each site (site1, site2, wordpress)
and a group or user, not www-data (?), with permissions to write files to the wordpress upload folder
I ask because restrictions on linux groups (can't have groups in groups) makes it a little bit confusing and also because many of the tutorial sites have conflicting information like, some recommend the use of www-data and some don't.
Also, I'm not sure if I understand how Pure-FTP is supposed to work exactly. I create a Pure-FTPD account and assign it a directory (/var/www) and a system user (ftpuser) and group (ftpgroup):
Can I assign more than 1 path? For example, if a user requires access to 2 sites.
Is it better to assign ftpgroup to all ftp locations and let Pure-FTPD manage account access?
Why would anyone have more than 1 ftpuser or ftpgroup? (Doesn't it mean users have access to everyone else's files if they could get there?)
Sorry for so many questions at once. I've been reading lots of tutorials but I think they've ended up making me more confused!