private home directories accessible by Apache and PHP
Hello, I have Ubuntu Server Edition 11.10: I am trying to setup a server that my friends and I can use to host our various websites. I have Apache and vsFTP setup to work with a bunch of home directories as the DocumentRoot directories for a respective bunch of websites. Each user can access his/her website via FTP. Unfortunately there's a bit of a security problem. In order for Apache not to give me a file permission error I has to set the permissions for the entire /home/ directory to 777. Users can't access each other's home directories vie FTP because the file root is the home directory. If, on the other hand, one user logged into my server with a remote shell client then he/she could totally destroy the other users' websites. A failed solution: I tried to get around this by setting the permission on all home directories to 774. Apache couldn't serve the directories anymore. I then added the user www-data to the groups of all of my other users. I gave each user and it's associated group ownership of it's home directory. Apache still gave me the permission error. Any ideas? Thanks, Naji |
No comments:
Post a Comment