You are not logged in.
Hi,
on my server I have
/data/subA
/data/subB
/data/subC
/data/subD
/data/subE
I exported /data via NFS and everything works great.
My problem is, that I do not wish to export subD.
All have same permissions, which I can't change, because the server needs to be able to access subD itself.
Also, since there are actually more than those 5 subdirectories, I'd like to avoid setting up individual exports for each subdirectory.
The ideal solution for me would be to continue exporting just "/data" but somehow excluding that one subdirectory..
I checked "man exports" and google but couldn't find anything useful.
So, I faithfully turn to you. ![]()
Mat
Offline
create another directory, and symlink/hardlink your subdirectories inside it, and then export that folder over nfs.
Offline
never would have thought about that! thx man!
just one small thing:
when the client mounts the share, it can still see the symlink, thus it knows, such a directory exists.
some way around that?
even if it's not possible, that's a great solution you posted there
Mat
Offline
i have checked articles on nfs and symlinks, and found out that they most likely wont work as the symlinks so resolved are done by the client only, and not by the server, but if it does work for you, please let me know. on the other hand, this symlink setup does work well with samba so you can try using that if nfs doesnt work out.
Offline
Symlinks didn't work for me with NFS on a similar matter. I use samba instead now, too.
no place like /home
github
Offline
i have checked articles on nfs and symlinks, and found out that they most likely wont work as the symlinks so resolved are done by the client only, and not by the server, but if it does work for you, please let me know. on the other hand, this symlink setup does work well with samba so you can try using that if nfs doesnt work out.
and that's what's helping me now!
on the server, I created a symlink under /data named subD but pointing to /myhiddendir.
When mounting /data on the client, the symlink is still there, but since the nfs-mount is treated like a local directory, it points to /myhiddendir ON THE CLIENT as well. So, the contents of "subD" is not exported and that's exactly what I wanted.
I guess that was the problem for demian, he would have needed to export (and mount on the client) /myhiddendir as well
Offline