NFS different user mapping

  • I have plex on my omv and the media is shared over smb and nfs for my windows, mint and kodi boxes.


    - the media library shows up as r/o correctly for all devices.
    - for my mint desktop, on the media library, i have some shares that are only for my userid and they map correctly with r/w


    My problem is, i want my media library on my mint box to be mapped with the plex user in r/w so that i can copy new media up and not have to chown, chmod, etc.


    my auto.nfs on the mint client looks like this.


    home -fstype=nfs4,rw,auto,timeo=14,intr,iocharset=utf8,uid=$USER,gid=users nas:/nas_home/
    media -fstype=nfs4,rw,auto,timeo=14,intr,iocharset=utf8,uid=123,gid=122 nas:/nas_media/
    working -fstype=nfs4,rw,auto,timeo=14,intr,iocharset=utf8,uid=$USER,gid=users nas:/nas_working/
    photos -fstype=nfs4,rw,auto,timeo=14,intr,iocharset=utf8,uid=$USER,gid=users nas:/nas_photos/


    the uid = 123 is the plex uid on both the server and client
    the gid = 122 is the plex group on both the server and client


    if i ls -l from the client, it shows me
    drwxr-sr-x 6 plex users 4096 Jul 29 2016 0-Action
    drwxr-sr-x 5 plex users 4096 May 5 21:00 0-Animation
    drwxr-sr-x 23 plex users 4096 May 5 21:00 0-Comedy


    but i can't copy up files or create directories. I get "permission denied"


    appreciate the help

  • You may do better by having your media files and folders configured with ownership and permissions that allow what you want to do.


    I don't configure any of my media with plex as the owner. I set the ownership as my_username:users


    And my_username and plex are members of the group users.


    The media file permissions are set to 0644.


    The media folder permissions are set to 2755.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • I don't understand that.


    when i set plex up, i found that the media meta and library data couldn't be updated unless the user was plex.


    so currently, i copy media up as myname:users but then have to chown to plex:users to be able to work with the media in plex

    • Offizieller Beitrag

    My problem is, i want my media library on my mint box to be mapped with the plex user in r/w so that i can copy new media up and not have to chown, chmod, etc.

    Force the NFS server to map all mounts of that particular share to the user (UID) you want using: squash_all,anonuid=${plexuid}


    media -fstype=nfs4,rw,auto,timeo=14,intr,iocharset=utf8,uid=123,gid=122 nas:/nas_media/

    This is probably wrong. I am not aware that nfs client mount can force the uid to be whatever they want in the mount options. This can be done for samba not aware of NFS.
    Do you really need nfs4?

  • I don't understand that.


    when i set plex up, i found that the media meta and library data couldn't be updated unless the user was plex.


    so currently, i copy media up as myname:users but then have to chown to plex:users to be able to work with the media in plex

    You are confusing the Plex database with your media. They are two completely different things. The plex user only needs read access to your media.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!