Unix Permissions issue with users belonging to the same group accessing a folder

Posted by TK Kocheran on Super User See other posts from Super User or by TK Kocheran
Published on 2011-01-13T22:42:59Z Indexed on 2011/01/13 22:55 UTC
Read the original article Hit count: 448

I have a folder I'd really like to allow another user on this machine access to. I'm using mt-daapd to serve music to the network, so I'd like to enable the mt-daapd user to access my Music directory, /home/rfkrocktk/Music. The master user is rfkrocktk obviously. I've tried to set all of my permissions properly on the directory, but the mt-daapd user can't acces the files.

I created a group called media-users and added both rfkrocktk and mt-daapd to it in order to give mt-daapd permission to simply read all of the files in that directory and subdirectories.

If I run id on each of my users, here's what's displayed:

$ id rfkrocktk
> uid=1000(rfkrocktk) gid=1000(rfkrocktk) groups=1000(rfkrocktk),4(adm),20(dialout),24(cdrom),29(audio),46(plugdev),104(lpadmin),115(admin),120(sambashare),124(vboxusers),1001(jupiter),2002(media-users)

$ id mt-daapd
> uid=123(mt-daapd) gid=65534(nogroup) groups=65534(nogroup),2002(media-users)

It definitely seems that both users are a part of the media-users group, so what could be going wrong?

If I run ls -l on the actual Music directory to see its permissions, here's the output:

drwxr-Sr-- 201 rfkrocktk media-users 12288 2011-01-13 12:26 Music

If I run ls -l on the Music directory to get its children, here's the output:

drwxr-Sr--  3 rfkrocktk media-users 4096 2010-12-20 15:31 2DBoy
drwxr-Sr--  3 rfkrocktk media-users 4096 2010-05-25 12:50 ABBA
drwxr-Sr--  3 rfkrocktk media-users 4096 2009-12-28 15:19 Access Denied
drwxr-Sr-- 10 rfkrocktk media-users 4096 2009-12-28 15:19 AC-DC
drwxr-Sr--  3 rfkrocktk media-users 4096 2009-12-28 15:19 Aerosmith
drwxr-Sr--  3 rfkrocktk media-users 4096 2010-06-04 10:45 A Flock of Seagulls
drwxr-Sr--  4 rfkrocktk media-users 4096 2010-05-28 18:13 Alestorm
drwxr-Sr--  3 rfkrocktk media-users 4096 2010-06-22 23:29 Amon Amarth
drwxr-Sr--  5 rfkrocktk media-users 4096 2009-12-28 15:19 Anberlin
...

From this, it would seem that I should be able to access the folders from mt-daapd, but I can't. Running sudo -i -u mt-daapd ls -l /home/rfkrocktk/Music displays nothing, indicating to me that for whatever reason, mt-daapd doesn't have access to read the folder. What am I doing wrong?

© Super User or respective owner

Related posts about linux

Related posts about unix