So I have a directory in /var/www (called cake) and I need to allow www-data to write to it, but I also want to write to it (without having to use sudo). I'm afraid to change the permissions to 777 in case some other user on my machine (or a hacker) attempts to modify files in that directory. How do I only allow access for myself and Apache's www-data?
Join Stack Overflow to learn, share knowledge, and build your career.
then
First command changes owner and group Second command adds s attribute which will keep new files and directories within cake having the same group permissions |
|||||||||||||||||
|
|
As stated in an article by Slicehost:
|
|||||
|
protected by Community♦ Feb 9 '15 at 9:01
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?