What linux permissions are need for www?
- by Xeoncross
I know that 777 is full read/write/execute permission for owner/group/other. So this doesn't seem to be needed as it leaves random users full permissions.
What permissions are need to be used on /var/www so that...
Source control like git or svn
Normal users in a group like "websites" or added to "www-data"
Servers like apache or lighthttpd
And PHP/Perl/Ruby
can all read, create, and run files there?
If I'm correct, Ruby and PHP scripts are not "executed" directly - but passed to an interpreter. So there is no need for execute permission on files in /var/www. Therefore, it seems like the correct permission would be chmod -R 1660 which would make
all files shareable by these four entities
all files non-executable by mistake
block everyone else from the directory entirely
set the permission mode to "sticky" for all future files
Is this correct?
Update: I just realized that files and directories might need different permissions - I was talking about files above so i'm not sure what the directory permissions would need to be.