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
- allows users to upload stuff to the server
- allows the web server to create/delete/manipulate files
- allows the users to remove the web server's ability to manipulate certain files/directories for additional application security.
How would I do this?
Wouldn't your first solution allow users to modify the files of another user by running scripts as the web server?
Yes, don't let them run scripts as the web server user. Also, users may use the webserver to read private files of other users
– Damn Terminal Dec 08 '12 at 02:01You can also prevent files readable by www-data to be viewable but other users. Don't run scripts as www-data and disable symlinking to other people's files, with disable_symlinks if_not_owner in nginx for example.
– Damn Terminal Dec 08 '12 at 02:15