I have a serious problem. Every time I edit my source code, I have to do a chown username:groupname for my htdocs folder. Now if I have to publish my files and have them executed on the webserver, I have to do a chown www:www for things to work right. I have tried to change my username,groupname in httpd.conf to my login in Mac OS but ownership still gets set incorrectly. I just want to be able to edit my source code and then not have to worry about changing the permissions.
What do I do?
Probably the easiest is to set the sticky bit of the enclosing directory and make
wwwthe group of it. So for example if you want to edit files in/Library/WebServer/Documentsyou would prepare it withThen all files you edit (or technically create) in
Documentswill havewwwgroup as well, so as long as yourumaskis reasonable (e.g.0022) they will be readable by the web server and you can edit them as you please.