Re: <DOT>foo gets NFSv4 HIDDEN attribute by default by nfsd? Re: How to set the NFSv4 "HIDDEN" attribute on Linux?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 25 Nov 2023 at 15:52, Jeff Layton <jlayton@xxxxxxxxxx> wrote:
>
> On Fri, 2023-11-24 at 12:43 -0500, Chuck Lever wrote:
> > On Thu, Nov 23, 2023 at 11:24:10PM +0100, Cedric Blancher wrote:
> > > Also, it is legal for a nfsd to give the DOT files (/.foo) the HIDDEN
> > > attribute by default? Right now on Windows they show up because NFSv4
> > > HIDDEN is not set, and it is annoying.
> >
> > I suppose an NFS server could do this, but I'm not aware of any
> > other multi-protocol file server (eg, Oracle ZFS or NetApp) that
> > does.
> >
> > Dot-files are obscured on POSIX systems by the NFS clients and their
> > user space (ls and graphical file navigators). I don't see why the
> > Windows NFS client can't be similarly architected. Or perhaps it
> > could fabricate the HIDDEN attribute for such files itself.
> >
> >
>
> Question. GETATTR operates on filehandles, which are roughly analogous
> to inode with Linux nfsd:
>
> $ touch visible
> $ ln visible .hidden
>
> Is the resulting inode and filehandle now considered HIDDEN or not?
>
> These kinds of issues are endemic when trying to map MS Windows concepts
> onto Linux (and vice-versa)

No, this is actually a good example to show that it *WORKS*.

1. Assuming Linux adds support for a user.xattr to set the NFSv4 HIDDEN flag
2. Assuming nfsd can give the flag on a per extended regular
expression basis depending on the filename, which would default to
"^\..+$" (all files starting with DOT get the NFSv4 HIDDEN flag)

Then of course [1] overrides [2], which means that the eregex is only
used if no user.xattr sets the flag.
In your example the file "visible" does not have the HIDDEN flag set
(no eregex match), but the hardlink would have that flag set.

Ced
-- 
Cedric Blancher <cedric.blancher@xxxxxxxxx>
[https://plus.google.com/u/0/+CedricBlancher/]
Institute Pasteur




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux