Permission settings for apache2 web content directories with several users?

Posted by John on Server Fault See other posts from Server Fault or by John
Published on 2010-04-09T12:24:31Z Indexed on 2010/04/09 12:33 UTC
Read the original article Hit count: 418

Filed under:
|
|

Hi there.

I've got a Debian VPS set up with a LAMP-stack. My apache2 instance runs on the user account 'www-data'.

In addition to the root account and the service accounts I have several user accounts belonging to friends, family and myself that includes FTP-access. This is to allow the users to drop files to the root of their domain which is located in their home folder.

I am having issues with setting the correct permissions so that Apache is able to serve the content ("403 Forbidden"). I could just do a 'chmod -R 755 *' on the entire www-directory for each domain, but from what I gather that's not a good idea.

Here's an example of the structure:
apache2 is run by 'www-data'
User 'john' has this home folder structure
/home/john/domains/somedomain.com/www
/home/john/domains/sub.somedomain.com/www

How can I keep things safe while still allowing users to upload content via FTP, and allow for file-uploads in lets say Wordpress?

© Server Fault or respective owner

Related posts about apache2

Related posts about chmod