How can I block one user and grant access to another user using an ACL?
I tried setfacl -Rdm u:maria: /home/elena
but I think this is wrong.
maria
is one user and elena
is another user.
If elena
and maria
are two different users, with two different user-ids
, you can execute the following command and allow read/write access to /home/elana
only toelana
(and root
):
sudo chmod 700 /home/elana
Explain:
- sudo - execute command as
root
- chmod 700 /home/elana- change mode of the directory to read/write/execute by owner only
Now, other users (including maria
) won't be able to access /home/elana
(unless they can get root
access - e.g. using sudo
)