Sharing, the NFS way
Address/netmask pair - If you want to export a directory to an entire IP sub-net then use this to specify the target range. 192.168.1.0/255.255.255.0 will mean that everyone in the IP address range 192.168.1.1-192.168.1.254 has access.
Finally if you want everyone to be able to access the directory, just specify the directory name but do not specify any hostname, IP address or address/netmask pairing.
/mnt/test
The above entry will export /mnt/test to everyone with the default permissions in place.
Multiple clients may be specified on the same line, separated by spaces. This is a good idea if you want to export the same directory with different access permissions to different clients.
/mnt/test nfs.freeos.com(rw) foo.freeos.com(ro)
We're now export /mnt/test to hosts nfs and foo but where nfs has write access also to directory test, foo's access is read-only. Please ensure that there are no spaces between the hostnames and the export options.
/mnt/test nfs.freeos.com (rw)
In the above, /mnt/test will be exported to nfs.freeos.com with the default access permission of read-only, but it will also be exported to everyone else with read-write access.
Common options to use
rw - By default, NFS will export the directory read-only. Quite often you might want to give write access too, for example when user home directories are being exported off a server.
no_root_squash - NFS exports directories with root_squash turned on. This means that root on the client machine will be mapped to the anonymous UID, commonly nobody. The result is that root on the client machine will not be able to access anything in the exported entry. The no_root_squash option prevents this behavior. This options should only be used for trusted clients. We had to use this one for the root filesystems that are
exported for the diskless clients.
noaccess - Use this one to make everything under a directory inaccessible to the client. Again this is a way of narrowing down the access permissions. Possible usage is when you're exporting a directory but certain directories under that exported directory should not be accessible to some hosts.
/mnt/test *.freeos.com
/mnt/test/sub foo2.freeos.com(noaccess)
- « first
- ‹ previous
- of 3
- next ›
- last »