How to allow one user -- but not all -- to access files of another user in Ubuntu?
I have a directory
/home/alice/dir owned by
$ cd /home/alice $ ls -l drwxr-x--- 2 alice alice 4096 Feb 10 21:24 dir
alice and group
alice have read/execute access. Of course,
/home/alice are readable/executable for all (
drwxr-xr-x), which is the default configuration for Ubuntu.
I want to allow user
bob access to this directory, but any other user
eve should not have access.
What I did so far was:
$ sudo adduser bob alice
$ getent group alice alice:x:1001:bob
bob is in the group
bob cannot access the directory:
$ whoami bob $ cd /home/alice $ pwd /home/alice $ ls -l drwxr-x--- 2 alice alice 4096 Feb 10 21:24 dir $ groups bob bob : bob alice $ cd dir bash: cd: test: Permission denied
Users were created with
sudo adduser alice sudo adduser bob sudo adduser eve
Ubuntu 14.04. I think ACL are not used, and I don't want to use them -- I think what I want should be perfectly achievable without ACL.