Why are directories under /mnt not visible when mounting filesystem with NFS?
0
votes
1
answer
2429
views
I setup an NFS share on my NFS server with
/etc/exports
containing / *(rw,no_root_squash,no_subtree_check)
Then I do exportfs -a
to activate the share and restart the nfs server.
I mount the share with autofs on the client machine with /etc/auto.nfs
containing foo -fstype=nfs4,soft,rw,noatime,allow_other server.tld:/
My auto.master
contains /mnt/nfs /etc/auto.nfs --timeout=30 --ghost
I restart autofs (systemctl restart autofs.service)
Then I see all directories from the server. But when I try to navigate to mounted serverdisks under /mnt/mounteddiskonserver I can't see anything anymore. No files, no directories, no write permission through nemo file browser on the client machine.
I can go to /home/user on the server and see and delete all my files on the server that have same permissions as /mnt/mounteddiskonserver/fileshere.
When I setup the NFS server to share /mnt/mounteddiskonserver specifically with with /etc/exports
containing /mnt/mounteddiskonserver *(rw,no_root_squash,no_subtree_check)
I can see all files and directories under /mnt/mounteddiskonserver and I can read and write.
Asked by Michiel Bruijn
(1 rep)
Feb 13, 2022, 05:01 PM
Last activity: Jul 12, 2025, 07:06 PM
Last activity: Jul 12, 2025, 07:06 PM