I am setting up my first server from scratch and as I am completely novice at this I am not sure if i am doing this right.
I have my web exposed folder at /var/www
and as I need to it accessible to everyone and writable by group and owner I set its permission to 774.
Is this how things are supposed to be set up or am I doing something terribly wrong?
Answer
The general rule is to give the least possible permissions/privileges for users. Folders permissions should be generally either 755
(does not provide w
for group) or 775
(provide w
for group).
In your case, 774
might not be enough for web server process to access the folder given that it is not the owner and is not a member in its group.
Comments
Post a Comment