0

This is reposted here to hopefully attract som answers. Original post: https://superuser.com/questions/1001470/files-directories-created-on-nfs-mount-with-no-permissions

I have a set up with a client running ubuntu 15.10 and a NFS server (Synology NAS, with DSM 5.2). I've succesfully mounted the share I need using the following line in fstab:

diskstation:/volume1/share /mnt/DiskStation/share nfs rw 0 0

(It doesn't automount - but thats another question :))

My nas is setup with rw privilege and permission to access mounted subfoldes - i use no_root_squash since im not accessing the share as root.

My problem is when I create a file or directory it is created with d--------- and is obviously inaccessible without running af chmod command first. I would like the files to be created with read and write rights for user and group and read for guests.

I've set my umask to "002" - but it doesn's seem to change a thing.

What can I try/do?

  • That mount sttmt seems wrong to me. see help.ubuntu.com/community/SettingUpNFSHowTo – Rinzwind Nov 17 '15 at 12:30
  • What UID (id -u) are you using on the client? What UID does that get mapped to at the server? – waltinator Nov 17 '15 at 17:25
  • @Rinzwind - i've tried different options, same result. From what I can understand from the NFS man page, and the link you shared, the mount sttmt is with default nfs settings. – Hoof Nov 17 '15 at 18:44
  • @waltinator - I have a user x on both systems. On the client x has uid 1000 and on the server has uid 1026. – Hoof Nov 17 '15 at 18:47
  • @waltinator - i kinda get, where this is heading. I'm not familiar at all with the concepts and how they play a role in nfs, but i'm guessing they should match in some way... Can I change the uid somehow? And should it be done on the server or the client? – Hoof Nov 17 '15 at 18:50
1

By changing my client's user's uid to match the uid of the user on the server, everything worked perfectly. Follow this guide to change uid of a user: How can I change my own user ID?

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.