NFS Shares and Permissions



  • I'm practicing going through the procedure for creating NFS shares, and I started pondering how one should handle file and directory permissions for items shared via NFS.

    From what I've learned so far, when you export a directory to be shared using NFS, you can dictate what hosts may mount the share as well as dictate the ability to read and / or write to the share.

    Let's say you wanted to export /share/nfs/with the intention of users being able to read and write to the share. Unless you have the exact same users and groups on your client and the NFS server and you configure the permissions for /share/nfs accordingly, it seems like Other permissions for shared directory on the NFS server would need to be read/write/execute. Otherwise, even though the NFS share grants read/write, the user account on the client machine (that doesn't exist on the NFS server) would not have permission to create or edit a file within the NFS share.

    For those that use NFS, is this how you typically handle this?



  • I will depends on which version you are using, NFSv3 or NFSv4?
    With version 4, you can use ACL to setup better permissions

    https://www.osc.edu/book/export/html/4523
    https://www.cs.iastate.edu/nfs4-permissions-and-ownership



  • @black3dynamite said in NFS Shares and Permissions:

    I will depends on which version you are using, NFSv3 or NFSv4?

    I'll check when after work today.