what is the proper solution to a server trying to write to a directory?

view story

http://unix.stackexchange.com – So, I have a box with a "deploy" user. This deploy user owns a code repository and wordpress is running on this box... When wordpress attempts to do something like upload a plugin, it is using the user "www-data" to write to "wp-content/plugins".. Apparently it is uploading a zipfile, unarchiving, and then removing the zipfile. I kept running into problems where wordpress was unable to do these things.. Since my entire code repository was set to be the owner and group: "deploy:deploy", obviously www-data is not able to access this. So, my first attempt was to add www-data to the deploy (HowTos)