The post this replies to couldn't be fetched from discuss.tchncs.de.
Open the original postReplying to a post on discuss.tchncs.de
When you add /24 you are exporting to the entire subnet. A single host export looks like this
/srv/nfsv4 192.168.0.10(ro,sync,secure,root_squash,subtree_check,fsid=0)
Just leave off the subnet mask.
Replying to @joulethief@discuss.tchncs.de
Even with bar exported to this client, it cannot see its subdirectories’ contents. What the hell is going on? Just to be clear, I did run exportfs -arv after every change to /etc/exports.
Replying to @CallMeAl@piefed.world
Thank you. I’m closer to what I want now. Can you help me explain this behavior though:
For testing purposes, I commented out every line in /etc/exports but these:
/srv/nfsv4 192.168.0.10(ro,sync,secure,root_squash,subtree_check,fsid=0) \ 192.168.0.20(ro,sync,secure,root_squash,subtree_check,fsid=0)
Client 192.168.0.20 can mount nfs-server:/ and listing the contents gives both directories foo and bar. It cannot see the contents of foo, as intended, but it can see what’s inside bar (EDIT: it can see down one level, so the subdirectories of bar, but nothing further down). I cannot figure out why? I rebooted the machine in hopes it was just a caching thing, to no avail.
Apart from that, I was hoping 192.168.0.20 could not even mount foo, but as long as its contents are hidden, I can live with that for now.