Permission trick
In case a daemon (dae) and a user (joe) have concurrent access to a directory (refered as dir) and both want to get read/write, here's a trick that can do:
- Create a group (shared in this document).
- chown -R dae:shared dir or chown -R joe:shared dir
- chmod -R 2775 (resp. 2770) dir
The directory tree should be read/write for all and only the user will change, depending on if it is the user or the program that created the file/directory.