There is an FTP user called 'A1', home dir: '/home/A1'. A1 can connect to FTP with no problems. There is two files in '/home/A1': 'abc.txt' and 'def.txt'.
Permission of 'abc.txt': 440; Permission of 'def.txt': 660
I want '/home/A1' to be shared with two more users called 'A2' and 'A3', so their home directory is '/home/A1' and they are added to the group 'A1'. Now they also can connect to FTP with no problems.
I want 'A2' and 'A3' to only be able to modify or delete 'def.txt' but not be able to modify or delete 'abc.txt'. Unfortunately now they can modify or delete both two files.
How could I set up this config? Thanks for your help in advance!
As requested here's the output for the following command:
$ ls -lR /home/A* /home/A1: total 14912 drwxr----- . -r--r--r-- 1 A1 A1 467 Aug 11 16:16 abc.txt -rw-rw---- 1 A1 A1 15264286 Aug 11 16:18 def.txt
I created two new users because I failed everything as possible with A1 and A2 (tried B also...), so here is the setup:
$ useradd C1 -m $ passwd C1 $ useradd C2 -d /home/C1 -g C1 $ passwd C2
chmod chown etc...
$ ls -laR /home/C1 /home/C1: total 8 drw-rw---- 2 C1 C1 4096 Aug 14 00:39 . drwxr-xr-x 35 root root 4096 Aug 14 00:37 .. -r--r----- 1 C1 C1 0 Aug 14 00:39 abc.txt -rw-rw---- 1 C1 C1 0 Aug 14 00:39 def.txt
Remember: the aim is to not allow C2 to del/mod abc.txt but he could del/mod def.txt
$ su C2 $ ls -la ls: cannot open directory .: Permission denied
What the hell? Group permission is readable for C2 so why "Permission denied"?