NFs permissions GID/UID

  • Hello all,


    I am a beginner to OMV. I am trying to use autofs in conjunction with NFs to create shares. I have been able to get the share showing up and can even enter the share. But cannot write any files to the share unfortunately. through my research I discovered that I needed to set the UID and GID and I was able to do that, but I still do not have access to my shares. Please help me to figure out my missing link, thanks.

    • Offizieller Beitrag

    Accessing the shares from another linux server or desktop?


    The uid/gid are number id's associated with user accounts, look at /etc/passwd. Since there is no security in NFS as authentication(unless you are using kerberos) let's say root user mounts nfs remote share, then he can do whatever he wants. I think by default omv uses all_squash, which prevents any root client or other from at least writing reducing them to the anonymous user. So maybe you can try in the extra options of the nfs share anongid=100,anonuid=1000, that means the root user or others will be presented with those id's. 100 gid is the users group, fairly standard across linux distros. So if the share has right permissions to the "users" group should be good to go


    Or you can simply add no_root_squash in extra options, should give you more freedom as root user. NFS is not easy for beginners, maybe try SMB


    https://linux.die.net/man/5/exports

  • I do have some experience with NFS and would like to use it because I mount another remote server through NFS as well. I am trying to access the shares from another computer on the same local network yes. I have given the shares what I think is the right permissions for a user in the GID=100 but when I add that to both the server in extra options and my autofs settings no luck still, though when I remove it I get permission denied so it is needed.


    these are my current settings, extra options


    subtree_check,insecure,anongid=100 - with RW privilege



    my autofs mount settings


    M-Test -fstype=nfs4,rw,hard,intr,tcp,nolock,noatime,nodiratime,netdev,gid=100,uid=1000 192.168.29.108:/export/M-Test

    • Offizieller Beitrag

    I also use NFS and autofs. I'm afraid I got it working quickly so I never had to learn a lot. Now I just use the exact same config everywhere.


    My procedure:

    • Setup the NFS shares in OMV.
    • Install autofs on the client.
    • Copy over auto.master (specifies the mount point for autofs) and auto.nfs (specifies the nfs servers and mount settings) from another client.
    • Create the autofs mountpount and reboot.


    And it just works.


    Here is a line (all nfs servers have a similar line) from my auto.nfs:


    nas5 -fstype=nfs4,hard,intr,nodev,nosuid,async,rsize=1048576,wsize=1048576 192.168.1.109:/export/nas5


    And it just works. I need to be logged in as a user that is a member of the group users on the OMV server.


    async could be bad without UPS if power is shaky.


    All my NAS are connected to each other using NFS and autofs like this. I use it to do backups and to move files from one NAS to another. And they all have the exact same auto.master and the same auto.nfs. I also connect to my NAS from Linux clients like this. Very convenient on a laptop. Automatically connected when in range.

  • Thank you I will test and report back



    Ok I tried mounting with both the nfs4 and nfsv4 option and that seems to cause an error saying the share is deleted/unreachable. When I use just nfs option I can access the share and see its size but not write any files.


    I am also working on getting a test string together to better troubleshoot.

    • Offizieller Beitrag

    Make sure you are logged in as a user that is a member of the group users. I always create standard users in a specific order. That way I ensure that Guest, Enrique and Marianne all have the same name, UID and GID on both client and server. I don't use a central login authentication.


    I have been using this setup continuously for more than a year now. First only only as client to a Synology NAS, recently also with a bunch of small OMV NAS. Never any problems.


    I have only used this in Ubuntu and OMV.

Jetzt mitmachen!

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