[plug] Funky NFS - Subdirectory exports
weirdit at gmail.com
Tue Jan 1 18:30:31 WST 2008
I'm trying to fix an issue with a "public" directory.
I have /home/public which under samba, uses umasks and the like to
force all files to be owned by public:users.
Using the following line in exports I can achieve the same thing with NFS.
But, I have /home exported too, and ideally want to be able to just
mount /home and have /home/public with the above options.
So.... I have /home with the below line.
(Getting these lines from exportfs, so that's actually what the NFS
server is seeing).
If I mount /home/public into a directory, it works as expected. If I
mount /home into a directory, /home/public uses the same settings as
/home instead of the settings I want it to use.
Short of mounting /home then /home/public on top, does anyone know of
a way to make this work? (/home/public is just a directory under /home
on the server, not a mountpoint).
 For anyone who plays with this, it can be a little unnerving to
try setting this up, and mounting the filesystem, and thinking that it
didn't work, because there are files owned by people other than
public:users, basically, the all_squash,anon settings don't effect the
UID/GID's already on the file system. So I have a file owned by
tim:users in /home/public, and it still shows as tim:users with the
/home/public mount settings. BUT, when I create a new file under those
settings, it gets the public:users ownership, as expected. I spent a
good hour or so before I worked this out!!
Timothy White - Unable to stay still for too long
Linux Counter user #273956
More information about the plug