/etc/exports permissions

For a long time I used a FreeNAS server to provide NFS access to various repositories, now I trying to do the same thing using native FreeBSD and getting a bit confused with permission settings...

If I have a system with a /data directory and want to allow universal r/w access to my LAN how should I set that up?

I've checked exports() but am not clear what needs to be set...

I've tried this among many other things but can't seem to get the hang of it
Code:
/data -mapall=root
 
For starters... don't try and map stuff to root, that's much too excessive.

Have you tried exports(5)?

Code:
/data -alldirs -mapall=nobody
Then simply make sure that the permissions for /data are set to 777 so that everyone can use it (even a user nobody). Of course -alldirs is optional, but I figured it might be useful to only grab a part of /data.
 
If I have a system with a /data directory and want to allow universal r/w access to my LAN how should I set that up?
I use NFSv4 for that. Here my /etc/exports

Code:
V4: / -sec=sys -network=192.168.1.0/24
/zdisk/data -mapall=root -network=192.168.1.0/24

and rc.conf

Code:
nfs_server_enable="YES"
nfsv4_server_enable="YES"
nfsuserd_enable="YES"

and mount command

Code:
mount -t nfs -o bg,soft,nfsv4 home:/zdisk/data ~/NAS
 
For starters... don't try and map stuff to root, that's much too excessive.

Have you tried exports(5)?

Code:
/data -alldirs -mapall=nobody
Then simply make sure that the permissions for /data are set to 777 so that everyone can use it (even a user nobody). Of course -alldirs is optional, but I figured it might be useful to only grab a part of /data.
I wanted unrestricted access so that I wouldn't have any problems with permissions, that's why I specified '-mapall=root'. There's only me using the network. I wanted the simplest possible setup. I can always add restrictions later if I want.
 
Back
Top