Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Permissions - Shared group folder on ext USB drive

I'm attempting to set up a shared folder on an external USB drive (ext4 formatted) that contains my media collection such that they can be accessed by users and a minidlna server process.

Any thoughts on what is going wrong here? Schoolboy error?

The USB drive is mounted at /mnt/WDCB500. Here's the entry from /etc/fstab

/dev/mapper/WDCB5000 /mnt/WDCB500 ext4 auto,nofail,defaults 0 0

  • Minidlna server runs under the default minidlna user
  • There is a group media. minidlna and other users are members of this group
  • The folder videos has ownership minidlna:media
  • The setgid bit is set as well
  • SELinux is disabled on the system

_

 [jetstream@dellgx620 ~]$ sudo ls -las /mnt/WDCB500/
 4 drwxrwx---  5 root      root      4096 Jun 12 20:58 .
 4 drwxr-xr-x. 7 root      root      4096 Jun 12 20:42 ..
16 drwxr-x---  2 root      root     16384 Jun  9 20:27 lost+found
 4 drwxr-x---  3 jetstream jetstream  4096 Jun  8 21:37 receipts
 4 drwxrwsrwx  3 minidlna  media     4096 Jun 12 09:00 videos

/etc/minidlna.conf

media_dir=/mnt/WDCB500/videos

Yet these users are denied access to the folder

Jun 12 21:05:54 dellgx620 minidlnad[1616]: [2017/06/12 21:05:54] minidlna.c:614: error: Media directory "/mnt/WDCB500/videos" not accessible [Permission denied]

_

[jetstream@dellgx620 ~]$ id
uid=1000(jetstream) gid=1000(jetstream) groups=1000(jetstream),10(wheel),3333(media)
[jetstream@dellgx620 ~]$ ls /mnt/WDCB500/videos
ls: cannot access '/mnt/WDCB500/videos': Permission denied
[jetstream@dellgx620 ~]$ id test
uid=1002(test) gid=1002(test) groups=1002(test),3333(media)
[jetstream@dellgx620 ~]$ sudo su - test
[test@dellgx620 ~]$ cd /mnt/WDCB500/videos
-bash: cd: /mnt/WDCB500/videos: Permission denied