[arch-general] Read permission for group
Hi, user 1001 (chuser) is in the group of user 1000 (rocketmouse). Folder and file have read permission for group 1000 (rocketmouse), but user 1001 (chuser) can't read the file. Do I miss the forest for the trees? [rocketmouse@archlinux ~]$ id chuser uid=1001(chuser) gid=1001(chuser) groups=1001(chuser),10(wheel),50(games),91(video),92(audio),93(optical),95(storage),100(users),1000(rocketmouse),108(vboxusers) Path and file permissions [rocketmouse@archlinux ~]$ ls -ld /home/ /home/rocketmouse/ /home/rocketmouse/.gtkrc-2.0_openbox+jwm drwxr-xr-x 4 root root 4096 Apr 23 10:14 /home/ drwxr----- 100 rocketmouse rocketmouse 4096 May 15 17:22 /home/rocketmouse/ -rw-r--r-- 1 rocketmouse rocketmouse 152 Oct 16 2014 /home/rocketmouse/.gtkrc-2.0_openbox+jwm Permission denied [rocketmouse@archlinux ~]$ sudo -u chuser ls -ld /home/rocketmouse/ /home/rocketmouse/.gtkrc-2.0_openbox+jwm ls: cannot access /home/rocketmouse/.gtkrc-2.0_openbox+jwm: Permission denied drwxr----- 100 rocketmouse rocketmouse 4096 May 15 17:22 /home/rocketmouse/ [rocketmouse@archlinux ~]$ sudo -u chuser cat /home/rocketmouse/.gtkrc-2.0 cat: /home/rocketmouse/.gtkrc-2.0: Permission denied This happens also when logged in as user 1001 (chuser) instead of using sudo -u, take a look at https://bbs.archlinux.de/viewtopic.php?id=27969, it's in German, but that doesn't matter regarding the English terminal output. Regards, Ralf
The folder's permission for the group has to be r-x. drwxr-x--- rocketmouse rocketmouse /home/rocketmouse/ Now reading the file does work. https://bbs.archlinux.de/viewtopic.php?pid=337305#p337305
2015-05-15 18:46 GMT+02:00 Ralf Mardorf <ralf.mardorf@rocketmail.com>:
The folder's permission for the group has to be r-x.
This is because x on directories is required to search their contents.
https://wiki.archlinux.org/index.php/File_permissions_and_attributes#Folders http://askubuntu.com/questions/83788/accessing-files-in-a-directory-without-... drwxr-x--- rocketmouse rocketmouse /home/rocketmouse/
Now reading the file does work.
participants (2)
-
Henrik Danielsson
-
Ralf Mardorf