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.

1 Answer 1

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)

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .