
:max_bytes(150000):strip_icc()/resilio-sync-5b880165c9e77c0050e690ff.png)
I know that there must be other alternatives, which more experienced Server Admins may be able to provide. It's working, but is not an elegant solution. I have setup an automated script - using Plisterine - that checks when there are modifications made to the files in the site folder, and runs the 2 terminal commands again over the whole lot.

Second, letting Apache run as an admin user is a security risk - someone could upload a malicious script that could erase files or steal information from anywhere on the server.įor the moment, I'm stuck with Option 1. First, as the file we are changing is a default config file for Apache, it will get overwritten in future system updates. BitTorrent Sync will then overwrite the equivalent files on the server - as the old "administrator" user - and therefore changes back the file owner and permission, re-creating the original problem for those files. Option 1 works fine, until the web developer makes new alterations to files in their local machine. and change them to the desired user/group:īoth these options, however, have drawbacks.

This can be done by editing the contents of the httpd_server_app.conf file. Just for good measure, I also changed the permissions in all the items, to ensure that only the owner and owner group can read+write:Ģ) Change the user Apache runs under to the main administrator user - the same user currently used by Bittorrent Sync. This can be done with the following command in Terminal: This means that Apache - and php running under it - is only able to read the folder, and is not allowed to write or modify it.ġ) Change the owner of the folder - and all items within - to "_www", the Apache user. The Apache user - which I found out by checking /library/server/web/config/apache2/httpd_server_app.conf - is, however, "_'Everyone' gets the 'read only' permission. When Bittorrent Sync copies/updates files in the site folder, it does so as the 'administrator' user. On the server, the Bittorrent Sync user is the main server administrator ("administrator"). Very neat way of working, client is very happy. The web developer works locally on their machine, saves their modifications, and the modified files get updated on the server via Bittorrent Sync. The server has a site home folder that is shared with a web developer via Bittorrent Sync.
