I have debian as an NFS client. I would like to mount a remote NFS with a specific user permissions (to specify the remote user account)

How can I do that?


NFS, while useful, is not generally great at dealing with user perms. In order to do this you have to do a few things:

  1. The UID of the files on the mount need to be the same as the user's UID on the local box
  2. If the user has local root you'll want to make sure root-squash is active on the NFS server. This ensures that access to files as the local root user is blocked.
  3. That said, if the user does have local root, it's pretty trivial for that user to create a local account with the same UID as the files he wants to get access to, and su to the new local user account, thus giving access to any file with the same UID as the newly created local user.

Under Ubuntu, a debian-based distribution, you should enter the command:

 sudo apt-get install nfs-common

You should then be able to connect and mount any available NFS-available directory.

  • 4
    This question neither addresses the specifics of connecting to an NFS server nor addressing the permissions issues in the question. – bobmagoo Aug 27 '12 at 18:57

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.