HOWTO grant access to a directory
If you want to share a directory with another shell user you can do so by setting the access control lists while logged in as your shell user.
This example shows how shell user userA
can share an application directory myapp
with another shell user userB
:
- 1
Log in to SSH as
userA
.- 2
Execute the following commands as
userA
:setfacl -m u:userB:--x $HOME setfacl -R -m u:userB:rwx $HOME/apps/myapp setfacl -R -m d:u:userB:rwx $HOME/apps/myapp setfacl -R -m d:u:userA:rwx $HOME/apps/myapp chmod g+s $HOME/apps/myapp
- 3
Optional: to create a shortcut to the directory for
userB
, run the following command asuserB
:ln -s /home/userA/apps/myapp ~/myapp