So I recently had to share out NFS shares which needed to be readable and writeable by the user mounting them. This is actually quite easy with NFS. Essentially, you are telling nfs that any changes by any client user are mapped to a single user on the server:

/mnt 192.168.1.0/24(rw,allsquash,insecure,nosubtree_check,anonuid=1000,anongid=1000)

I obviously don’t have to tell you how dangerous this can be…so unless you are sure you want to do this aka you trust everyone on the network you are sharing this out to, don’t do it.

More on this here.

UPDATE: So, imagine this scenario:

/mnt raid anotherfs

Where both raid and anotherfs are seperate filesystems which are mounted there. Now if /mnt is exported via NFS, your clients won’t be able to see the contents of those mounted filesystems (raid and anotherfs).

To fix this, add the “crossmnt” option to your /etc/exports share line. YAY!!

Blog Logo

Mario Loria


Published

Image

./scriptthe.net

Because 127.0.0.1 gets old after a while.

Back to Overview