2014-03-07 20:16:27

by Phillip Susi

[permalink] [raw]
Subject: chattr: operation not supported ( on symlinks )

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

It seems that symlinks return -ENOTSUP for lsattr, causing chattr -R
to spew errors. Why don't symlinks support attributes, and if not,
shouldn't chattr know this and suppress operating on symlinks instead
of spewing errors?

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTGikYAAoJEI5FoCIzSKrwXhgH/3ZMK5OBUNRK6Pty+lSk/aj6
P7KkeLkJl16TaeNFp/rFoDju16PA/I3uPQipY25VdNYNCVMEmQOd0i//55gU47ur
ZtdjAD4vMNTpFsV/oxjrx+f6kp1OqYKylConQxo/AAS+YDHq7adCds31N8mny1o8
WI/TYp3M4uGtQQ2yHF5j7jvZNR2gacMrXfN+6fbdIP99I2j4v4eHdvJJRQuo5vun
Q2ZQw5a/GGPlXUYcIcnFkmXlNDJIfGO7WPxXfaUbspQwRH21Ithr61pk1LVLZjN9
eptvSQpXBhKdQzeAMbUKS5AIoN7u0KMcIErfhR2mwDncfCcsI/PPTQSSf8B1L0o=
=vzkc
-----END PGP SIGNATURE-----


2014-03-08 15:30:00

by Theodore Ts'o

[permalink] [raw]
Subject: Re: chattr: operation not supported ( on symlinks )

On Fri, Mar 07, 2014 at 03:16:24PM -0500, Phillip Susi wrote:
> It seems that symlinks return -ENOTSUP for lsattr, causing chattr -R
> to spew errors. Why don't symlinks support attributes, and if not,
> shouldn't chattr know this and suppress operating on symlinks instead
> of spewing errors?

The VFS layer doesn't pass ioctl's down to the file system layer for
symlinks. Thinking about this, arguably the right answer is to allow
chattr to function on symlinks, since it cloud be useful to make
symlinks immutable.

- Ted