0

I am using my raspberry pi as a plex server and have having serious problems with one of the shared folder...


Related to my Synology NAS

All three are on my local network Synology NAS:

  • "music" is directly on the raid drives (and is the shared folder I have problems with)
  • "tv" and "movies" are stored on a USB drive plugged into the NAS

I have configured my NAS NFS Permissions the same for all three shared folders:

  • Explicity local IP of the raspberry pi
  • read-only permissions
  • No mapping/squashing of users
  • security is "sys"
  • Async
  • non-privileged ports allowed
  • cross-mount allowed

Related to permissions & fstab on my raspberry pi

The relevant part of my etc/fstab is as follows:

102.168.1.1.140:/volumeUSB1/usbshare1-2/MEDIA/MOVIES    /nas/movies   nfs   auto,defaults,nofail 0 0
102.168.1.1.140:/volumeUSB1/usbshare1-2/MEDIA/MOVIES    /nas/tv       nfs   auto,defaults,nofail 0 0
102.168.1.1.140:/volume1/music                          /nas/music    nfs   auto,defaults,nofail 0 0

I have each of the follow mount points created

  • /nas/tv (mounts and plex can find media within it)
  • /nas/movies (mounts and plex can find media within it)
  • /nas/music (mounts and I can browse and see the files on the the raspberry pi itself but plex itself can't find any content)

Before running sudo mount -a, all three have the following user/group settings:

  • user as "root" (uid=116)
  • group as "plex"(gid=4096)

...and then after running sudo mount -a:

MOVIES and TV:

  • user as "1024" (uid=1024)
  • group as "users" (gid=100)

MUSIC:

  • user as root (uid=0)
  • group as "root" (gid=0)
  • Have you tried to set user and group as fourth field in fstab (see manpage)? (i.e. 102.168.1.1.140:/volumeUSB1/usbshare1-2/MEDIA/MOVIES /nas/movies nfs auto,defaults,nofail,uid=root,gid=plex 0 0) – Fabian May 12 '18 at 12:30
2

That's normal. After mounting a filesystem, the mountpoint is completely overlayed, so /nas/tv now represents the root directory of the filesystem (or network share) that you just mounted.

(But even if that didn't happen, the permissions of the directory would have no effect on permissions of the individual files inside it. So your approach is doubly useless.)

There is no generic built-in mechanism for overriding ownership and permissions of a whole filesystem, but you can install bindfs for that.

  • Thanks for the quick reply...! So is bindfs the correct way to handle this or should I be changing ownership/group of volume1/music directory and files on the NAS itself? – Bendy May 12 '18 at 12:09
  • Changing ownership on the NAS itself would be best – if possible. (That is, if you don't have the complex situation where different clients need different UIDs for the same share...) – grawity May 12 '18 at 12:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.