0

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.

0

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)

  • It worked great :) But can I do the same procedure with an access list? – andreas Mar 5 '17 at 14:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.