Why are the recommended permissions for the code directory 755 and not 700?
I've chowned the directory to www-data and chmoded to 700 and it still seems to work.
Why does anything other than the server need access?
Thanks
Security recommendations - code directory permissions
Number of replies: 2Re: Security recommendations - code directory permissions
When the time comes to update to the next version of Moodle, you (not www-data) will need write access to the code files.
www-data does not need write access to the code files.
So, if you want to be paranoid, set the permissions there to 500 most of the time. Then when you need to do an upgrade, temporarily change them to something that lets you change the files,
Re: Security recommendations - code directory permissions
Don't make www-data owner of the code files at all. If you own the files, then you can change their permissions into something writeable for you.
Give r/w rights to your user and r only (and of course x for directories) for the group. Then make the group of the code www-data.