I created folder /home/john/Desktop/test
.
I want to give it access to user john
itself and to user mike
.
I created group:
sudo groupadd jm
And added users to same group:
sudo usermod -a -G jm john
sudo usermod -a -G jm mike
Then gave right:
sudo chgrp -R jm /home/john/Desktop/test
sudo chmod -R 770 /home/john/Desktop/test
When I login with mike
and write cd /home/john/Desktop/test
,
it writes Permission denied
.
What may be the problem?
Output of ls -la:
drwxrwx---+ 2 john jm 4096 Nov 7 15:35 test
Desktop
directory? Thejm
group (or "others") needs at leastx
permissions on all intermediate directories between/
and/home/john/Desktop/test
. – Kusalananda Nov 07 '18 at 12:37chmod o+x /home/john /home/john/Desktop
or (but you probably don't want this)chgrp jm /home/john /home/john/Desktop
followed bychmod g+x /home/john /home/john/Desktop
. – Kusalananda Nov 07 '18 at 12:49x
access to all the directories above it. – Kusalananda Nov 07 '18 at 12:54