NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
titimoi
Dec 06, 2020Aspirant
How to correctly setup NFS folder permissions
Hello,
I've read recently that NFS might be more performant than SMB. Since I'm on linux, I wanted to give it a go. I'm on a RN102 running Readynas 6.10.3.
Here is my setup on the NAS:
- NFS activated globally
- NFS active on one share "MyDir" with AnyHost having read/write access, no root squash
- "MyDir" has the file access set to use "MyUser" and group "MyGroup"
- "MyUser" also has read/write access checkbox checked.
- "MyUser" has UID 1000 and has the primary group "MyUser" with GID 1000
On the client side:
- I have a "MyUser" user with the UID 1000 and GID 1000
- my /etc/fstab contains
<nas-ip>:/NAS-VOLUME/MyDir /media/MyDir nfs defaults 0 0
- I've created a /media/MyDir and set the "MyUser" as owner and group
# sudo chown MyUser:MyUser /media/MyDir
$ ls -l /media/ drwxr-xr-x 2 MyUser MyUser 4096 Dec 6 16:45 MyDir
Mounting the share is no problem, I can list the content of MyDir, but I can't access the content of subfolders. They are owned by the NAS' admin user with UID 98 it seems.
# sudo mount /media/MyDir $ ls -l /media/MyDir total 0 drwxrwx--- 1 98 98 42 Oct 7 20:42 Desktop drwxrwx--- 1 98 98 416 Nov 22 21:44 Downloads $ ls -l /media/MyDir/Desktop ls: cannot open directory '/media/MyDir/Desktop': Permission denied
How can I change this, or make sure I can access these files as "MyUser" on the client?
If I am understanding you correctly, you have already configured the share to be owned by MyUser/MyGroup.
What you need to do to apply that setting to all the existing subfolders and files is to click on the "reset" control on the file access share for the share.
Though the warning says it will change permissions to the defaults, you'll find it actually resets the owner/group to the configured value (MyUser/MyGroup in your case).
8 Replies
Replies have been turned off for this discussion
- StephenBGuru - Experienced User
If I am understanding you correctly, you have already configured the share to be owned by MyUser/MyGroup.
What you need to do to apply that setting to all the existing subfolders and files is to click on the "reset" control on the file access share for the share.
Though the warning says it will change permissions to the defaults, you'll find it actually resets the owner/group to the configured value (MyUser/MyGroup in your case).
- titimoiAspirant
Thank you so much, that did the trick, and I'm glad I ended up asking.. would never have found that trick.
Can't edit my first post, I mixed the MyUser and MyGroup a little, but you got it still.
BTW, I'm also glad I tried NFS, it seems to yield much better performances.
Related Content
NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!