I could not find out what is the best way to setup your web files under UNIX OS.
I have Apache running on Centos OS, I put my root directory under /var/www/html
Here is the example:
/var/www/html 750 ssh-user apache
/project_a 750 ssh-user apache
/normal_folder 750 ssh-user apache
/upload_folder 770 ssh-user apache
/project_b 750 ssh-user apache
I setup full control to the owner (ssh-user) and only read access to group users (apache group). For upload folder, I setup 770 which group users able to write stuff inside.
What is ssh-user? This is the same user who I use to login using SSH.
These settings are fine but sometime I got annoyed because I need to re-set the file permission by doing
chmod 750 -R project_a
chown ssh-user:apache project_a
Everytime I create new file/upload using FTP, I need to execute those commands.
So my questions:
- is my file ownership correctly setup?
- how about file permission?
- do you use any tools to manage this file permission? I heard facl may do this elegantly
- anybody used capistrano? any hint for the file permission and ownership?
Thanks guys!
No comments:
Post a Comment