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 Thu, Nov 23, 2023 at 2:24 PM Cedric Blancher
<cedric.blancher@xxxxxxxxx> wrote:
>
> On Wed, 22 Nov 2023 at 23:42, Cedric Blancher <cedric.blancher@xxxxxxxxx> wrote:
> >
> > On Mon, 20 Nov 2023 at 12:46, Jeff Layton <jlayton@xxxxxxxxxx> wrote:
> > >
> > > On Sun, 2023-11-19 at 17:51 +0100, Cedric Blancher wrote:
> > > > On Sat, 18 Nov 2023 at 12:56, Jeff Layton <jlayton@xxxxxxxxxx> wrote:
> > > > >
> > > > > On Sat, 2023-11-18 at 07:24 +0100, Cedric Blancher wrote:
> > > > > > Good morning!
> > > > > >
> > > > > > NFSv4 has a "hidden" filesystem object attribute. How can I set that
> > > > > > on a Linux NFSv4 server, or in a filesystem exported on Linux via
> > > > > > NFSv4, so that the NFSv4 client gets this attribute for a file?
> > > > > >
> > > > >
> > > > > You can't. RFC 8881 defines that as "TRUE, if the file is considered
> > > > > hidden with respect to the Windows API." There is no analogous Linux
> > > > > inode attribute.
> > > >
> > > > Can we use setfattr and getfattr to set/get the NFSv4.1 HIDDEN and
> > > > ARCHIVE? We have Windows NFSv4 clients (and kofemann/Roland's codebase
> > > > supports this), and that means we need to be able to set/get and
> > > > backup/restore these flags on the NFSv4 server side.
> > > >
> > >
> > > No. They would need to be stored in the inode on the server somehow and
> > > there is no place to store them. These attributes are simply not
> > > supported by the Linux NFS server.
> >
> > Linux has xattrs, which are per inode, and can be backuped and
> > restored via tar --xattrs. That would be good enough
>
> 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.
First, just to let you know, I am not a Linux developer. I work on the FreeBSD
NFS code...

To be honest, you can do just about anything you want in the client. The RFCs
basically define what goes "on the wire".
Now, having said that, you might run into difficulties doing this
because "hidden"
is defined as a RW attribute and to set it would require renaming the file.

rick

>
> 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