1

Possible Duplicate:
What are the best linux permissions to use for my website?

I'm searching for an easy way to organize web server directories on Linux.

Users can use FTP to upload their web pages onto the server. But if they do this, the files are owned by the user themself and the web server can't write to them.
I'm searching for a solution that

  1. allows users to upload stuff to the server
  2. allows the web server to create/delete/manipulate files
  3. allows the users to remove the web server's ability to manipulate certain files/directories for additional application security.

How would I do this?

1 Answers1

0

The simplest solution would be to add your web server user (www-data for example) to each user's group and set read/write permissions for the group.

Alternatively, you can use Access Control List (ACL) to set up very fine-grained permissions on files and directories, including a revoke-able (by the owner of the file) special access for your web server user. Details will depend on your distribution, consult documentation. Here's how you could do it on Ubuntu for example.