From my days of amateur web development the principle of least privilege has beaten into me not to use chmod -R 777 dir
. I have personally never needed it, so I've never used it.
I now work on a development team professionally, and we recently moved executable code to a shared internal server. Only people from the company can access the server and we trust everyone at our company. The code isn't particularly sensitive, anyway.
Trying to run a script† that another team member wrote into the shared folder caused a permissions error, so "just to check if it would otherwise work" a coworker ran chmod -R 777 /opt/path/to/shared/folder
on the project. Once it did work the coworker said it's fine to leave it as is instead of switching to a more controlled groups
solution for us.
Because I am a chimpanzee I want to speak up and say this is bad practice and we should change it to a groups
solution. However, after putting some thought into it I can't come up with a reason why shared executable code on an internal server shouldn't have 777
permissions.
From a security standpoint, is there any reason to change our project folder's permissions from 777
to something tied down a little tighter with groups
?
† We can't change this scripts' permission requirements.