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
Desktopdirectory? Thejmgroup (or "others") needs at leastxpermissions on all intermediate directories between/and/home/john/Desktop/test. – Kusalananda Nov 07 '18 at 12:37chmod o+x /home/john /home/john/Desktopor (but you probably don't want this)chgrp jm /home/john /home/john/Desktopfollowed bychmod g+x /home/john /home/john/Desktop. – Kusalananda Nov 07 '18 at 12:49xaccess to all the directories above it. – Kusalananda Nov 07 '18 at 12:54