NFS directories permissions
It’s tough to allow write access to NFS shares. You basically have 3 options:
- match the owner / group IDs on both the server and the client
- allow all to have write access (good ol’
chmod 777 *
which is sooo bad for security reason) - sticky bits
The sticky bits is slightly more secure than “allow all” access given that only the file owner can rename or delete the files in that directory. This allows the user on the client side to create files and directories on the share and not delete what was already there or added by others.
Setting the sticky bit
To allow others to write on the shared drive, we must set the sticky bit and allow the others to write:
find . -type d -exec sudo chmod o+wt "{}" \;