You are not logged in.

#1 2021-01-09 03:36:17

KaibutsuX
Member
Registered: 2015-04-22
Posts: 20

NFS exports for differing permissions

I want to export a directory for nfs sharing with two (or more) sub directories that each have different permissions.

What I want is to do this:

/data/sharing/fullaccess    client1(rw, async)
/data/sharing/readonly      client1(ro, async)

It seems like nfs clients won't let me mount the second readonly directory because something about how the export works conflicts with the first.

What does work is this:

/data/sharing/    client1(rw, async)
/data/sharing/readonly      client1(ro, async)

But I'm not sure where in the nfs documentation this kind of configuration is specified and I'm not sure what ramifcations this configuration has. It also appears that it doesn't work if I made the parent RO and the child RW. So can anyone either explain this behavior and the best practice for this kind of setup or point me to the relevant nfs documentation?

Offline

#2 2021-01-09 09:29:21

seth
Member
Registered: 2012-09-03
Posts: 49,981

Re: NFS exports for differing permissions

man 5 exports

Check "no_subtree_check".

Is there a connection between the two paths on the local FS (eg. them being symlinks or bind mounts of each other)?

Offline

#3 2021-01-12 02:50:35

KaibutsuX
Member
Registered: 2015-04-22
Posts: 20

Re: NFS exports for differing permissions

So the manpage says from nfs-utils 1.1.0 onwards the default is no_subtree_check. My nfs-utils is 2.5.2-2

I'm not understanding what turning on subtree checking would imply here.

My directories are not symlinked or anything, just two independent directories on the same filesystem.

I'm using them for shared retropie nfs mount points from a central server.

/data/sharing/retropie/saves - rw - I want this to be read/write so multiple clients can use/save
/data/sharing/retropie/config - ro - I want all clients to use the same config files, but not be able to modify them (I will modify on the server myself)

Offline

#4 2021-01-12 08:10:58

seth
Member
Registered: 2012-09-03
Posts: 49,981

Re: NFS exports for differing permissions

The idea was to not trust that statement and explicitly disable it.

seems like nfs clients won't let me mount the second readonly directory because something

Please post the actual error message intead of your interpretation.

Offline

Board footer

Powered by FluxBB