Permissions on webservers are a hassle if not setup correctly. It’s one thing to setup everyone with their own group if they aren’t going to be editing each others files but in an environment with multiple editors it’s not a good idea, IMO.
The best way I’ve found so far to clean up my permissions, with the help of Qunu.com, was the find command.
# find /path/to/dir -user [username] -group [groupname] -exec chown newown.newgroup {} \;
and then I need to make sure the files are group writable
# chmod g+w /path/to/dir
If you want to do Recursive changes put the -R option after the command of ‘find’ or ‘chmod’.
Since I already cd into the directory and I only need to edit the groups I used these:
# find . -group [group] -exec chown :[newgroup] {} \;
# chmod g+w *
I’m still hesitant with this solution, probably because this is the only option I know right now.
More importantly, what’s the best practice for webservers with multiple editors and developers? Dav and Samba? I wonder how Subversion handles permissions since that’s what we are going to deploy in our next system.
