3

Is there a way to allow non-root, non-sudo users to mount synology NFS shares as themselves (not sudo)? I want to allow users to mount their own shares and benefit from the increased performance of NFS over SMB.

I'm using xubuntu 16.04LTS and the options i've read about require doing a export on the host. I don't think this option is available to do on a synology NAS but i have enabled NFS with No mapping: (Allows all users of NFS client, including root users, to maintain original access privileges).

When i use the following in /etc/fstab:

<serverip:/folder> <mount pointa> nfs rw,relatime,noauto,user 0 0

<testuser> is able to mount with mount <mount pointa> but cant access files. After its mounted the mount point now has root as owner where before the owner was <testuser>. Is there a way to allow user to mount synology nfs share without sudo?

Similar thread is here but that didn't appear to be the issue.

muru
  • 207,228
jtlindsey
  • 2,100

1 Answers1

0

I managed this by adding this to my /etc/fstab

//<nas_ip_address>/<shared_folder_name> /mnt/synology cifs credentials=/etc/synology.credentials,uid=<your_user_id>,gid=<your_group_id>,file_mode=0664,dir_mode=0775 0 0

The whole config is important, but particularly:

uid=<your_user_id>
gid=<your_group_id>

Your credentials file should be accessible by the given user_id and should contain:

username=<NAS_USERNAME>
password=<NAS_PASSWORD>