You are not logged in.

#1 2010-04-24 17:02:44

dninja
Member
From: Sheffield, UK
Registered: 2006-04-29
Posts: 374
Website

NFS sharing with different permissions

I'm trying to share a directory over NFS giving read access to most of the network but read/write access to one machine. I tried this in the exports file

/var/media     192.168.0.0/24(ro,sync,no_subtree_check) 192.168.0.2(rw,sync,no_subtree_check)

but the .2 machine is only given read access. I've tried swapping the order and splitting over two lines but I can't get it to work.

192.168.0.2 # showmount  -e server
Export list for server:
/var/media 192.168.0.0/24

Is this possible?

Offline

#2 2010-04-24 17:37:52

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: NFS sharing with different permissions

What are the permissions/owner of /var/media on the server? You may need to add 'no_root_squash' to the second machine's export.

Offline

#3 2010-04-24 17:59:11

dninja
Member
From: Sheffield, UK
Registered: 2006-04-29
Posts: 374
Website

Re: NFS sharing with different permissions

If I just have the one line specific for the .2 machine the share works fine in rw mode. I think that it takes the most general clause and applies that. I've kind of proved that to myself by adding a rule for 192.168.0.0/16 in rw mode which beats the other two rules as it is more general.

Offline

Board footer

Powered by FluxBB