So here is the issue. A client of mine is using Mac OSX Snow Leopard as his web server. He has multiple clients, and sites, etc. He also has multiple designers who access the system.
He has a user who he has locked down to certain directories (for sites he only works on). When the user uploads his files, my client has to go in a root to set the owner to _www so that Apache will have permissions to run the files.
What he'd like to know is remove the need to constantly have to go in behind the user to propagate the permissions on the files. In Windows, he is just using Filezilla without a problem since the user isn't integrated into the OS.
Any ideas how to accomplish this?
I don't have a mac system handy to verify but...
In Linux, I'd use the SGID bit on the directory and make the directory group the group Apache runs under. All files created in that directory will have the group automatically set to the directory group, and hence will be readable to Apache. No changing of permissions involved.
Set the group permissions of the directory to SGID (
chmod g+s dirname
), and the group of every newly created file or subdirectoy will be inherited to be _www.But you have to do this for every existing subdirectory, as the SGID bit is not propagated to already existing subdirectories.