* A question about extended attributes of filesystem objects (setfattr command)
@ 2004-06-30 12:52 Jacky Malcles
2004-06-30 13:31 ` Michael Kerrisk
0 siblings, 1 reply; 5+ messages in thread
From: Jacky Malcles @ 2004-06-30 12:52 UTC (permalink / raw)
To: linux-kernel
I have a question regarding
Attributes of symlinks vs. the files pointed to
If I try to attach name:value pair to object symlink file
then I'll get: "Operation not permitted"
reading the man pages of setfattr (or attr) I thought that it operates
on the attributes of the symbolic link itself.
show:
-----
touch f
ln -s f l
setfattr -n user.filename -v ascii1 f l
setfattr -h -n user.filename -v ascii2 f
getfattr -d f l
setfattr -h -n user.filename -v ascii3 l
setfattr -h --no-dereference -n user.filename -v ascii4 l
getfattr -d f l
so, my question is : what is expected ?
I've
libattr-devel-2.2.0-1
libattr-2.2.0-1
attr-2.2.0-1
and a 2.6.7 kernel
many thanks,
regards,
--
Jacky Malcles B1-403 Email : Jacky.Malcles@bull.net
Bull SA, 1 rue de Provence, B.P 208, 38432 Echirolles CEDEX, FRANCE
Tel : 04.76.29.73.14
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: A question about extended attributes of filesystem objects (setfattr command)
2004-06-30 12:52 A question about extended attributes of filesystem objects (setfattr command) Jacky Malcles
@ 2004-06-30 13:31 ` Michael Kerrisk
2004-06-30 14:04 ` Jacky Malcles
2004-06-30 14:22 ` Jacky Malcles
0 siblings, 2 replies; 5+ messages in thread
From: Michael Kerrisk @ 2004-06-30 13:31 UTC (permalink / raw)
To: Jacky Malcles; +Cc: linux-kernel
Gidday,
> I have a question regarding
> Attributes of symlinks vs. the files pointed to
>
> If I try to attach name:value pair to object symlink file
> then I'll get: "Operation not permitted"
What file system are you using? If ext2, ext3 (or patched kernel
supporting Reiserfs EAs), did you mount with "-o user_xattr?
(The above error suggests you haven't used this option.)
> reading the man pages of setfattr (or attr) I thought that it operates
> on the attributes of the symbolic link itself.
No, these commands follow symbolic links.
> show:
> -----
> touch f
> ln -s f l
> setfattr -n user.filename -v ascii1 f l
> setfattr -h -n user.filename -v ascii2 f
> getfattr -d f l
> setfattr -h -n user.filename -v ascii3 l
> setfattr -h --no-dereference -n user.filename -v ascii4 l
> getfattr -d f l
>
> so, my question is : what is expected ?
attr(5) specifically notes that USER EAs are disallowed on
symbolic links, but this is rather an issu that affects the
use of lsetxattr(2).
Cheers,
Michael
--
"Sie haben neue Mails!" - Die GMX Toolbar informiert Sie beim Surfen!
Jetzt aktivieren unter http://www.gmx.net/info
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: A question about extended attributes of filesystem objects (setfattr command)
2004-06-30 13:31 ` Michael Kerrisk
@ 2004-06-30 14:04 ` Jacky Malcles
2004-06-30 14:21 ` Michael Kerrisk
2004-06-30 14:22 ` Jacky Malcles
1 sibling, 1 reply; 5+ messages in thread
From: Jacky Malcles @ 2004-06-30 14:04 UTC (permalink / raw)
To: Michael Kerrisk; +Cc: linux-kernel
Michael Kerrisk wrote:
>
> Gidday,
>
> > I have a question regarding
> > Attributes of symlinks vs. the files pointed to
> >
> > If I try to attach name:value pair to object symlink file
> > then I'll get: "Operation not permitted"
>
> What file system are you using? If ext2, ext3 (or patched kernel
> supporting Reiserfs EAs), did you mount with "-o user_xattr?
> (The above error suggests you haven't used this option.)
# mount
/dev/sdb3 on /a type ext3 (rw,acl,user_xattr)
...etc...
>
> > reading the man pages of setfattr (or attr) I thought that it operates
> > on the attributes of the symbolic link itself.
>
> No, these commands follow symbolic links.
>
> > show:
> > -----
> > touch f
> > ln -s f l
> > setfattr -n user.filename -v ascii1 f l
> > setfattr -h -n user.filename -v ascii2 f
> > getfattr -d f l
> > setfattr -h -n user.filename -v ascii3 l
> > setfattr -h --no-dereference -n user.filename -v ascii4 l
> > getfattr -d f l
> >
> > so, my question is : what is expected ?
should have added this:
[root@t20 acl]# show
# file: f
user.filename="ascii2"
# file: l
user.filename="ascii2"
setfattr: l: Operation not permitted
setfattr: l: Operation not permitted
# file: f
user.filename="ascii2"
# file: l
user.filename="ascii2"
[root@t20 acl]#
>
> attr(5) specifically notes that USER EAs are disallowed on
> symbolic links, but this is rather an issu that affects the
> use of lsetxattr(2).
>
> Cheers,
>
> Michael
>
> --
> "Sie haben neue Mails!" - Die GMX Toolbar informiert Sie beim Surfen!
> Jetzt aktivieren unter http://www.gmx.net/info
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
Jacky Malcles B1-403 Email : Jacky.Malcles@bull.net
Bull SA, 1 rue de Provence, B.P 208, 38432 Echirolles CEDEX, FRANCE
Tel : 04.76.29.73.14
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: A question about extended attributes of filesystem objects (setfattr command)
2004-06-30 14:04 ` Jacky Malcles
@ 2004-06-30 14:21 ` Michael Kerrisk
0 siblings, 0 replies; 5+ messages in thread
From: Michael Kerrisk @ 2004-06-30 14:21 UTC (permalink / raw)
To: Jacky Malcles; +Cc: linux-kernel
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="us-ascii", Size: 2202 bytes --]
Salut Jacky,
> > > I have a question regarding
> > > Attributes of symlinks vs. the files pointed to
> > >
> > > If I try to attach name:value pair to object symlink file
> > > then I'll get: "Operation not permitted"
> >
> > What file system are you using? If ext2, ext3 (or patched kernel
> > supporting Reiserfs EAs), did you mount with "-o user_xattr?
> > (The above error suggests you haven't used this option.)
>
> # mount
> /dev/sdb3 on /a type ext3 (rw,acl,user_xattr)
> ...etc...
Okay.
> > > reading the man pages of setfattr (or attr) I thought that it operates
> > > on the attributes of the symbolic link itself.
> >
> > No, these commands follow symbolic links.
> >
> > > show:
> > > -----
> > > touch f
> > > ln -s f l
> > > setfattr -n user.filename -v ascii1 f l
> > > setfattr -h -n user.filename -v ascii2 f
> > > getfattr -d f l
> > > setfattr -h -n user.filename -v ascii3 l
> > > setfattr -h --no-dereference -n user.filename -v ascii4 l
I'm sorry -- I missed the above "--no-dereference"; that's why
my point below becomes relevant.
> > > getfattr -d f l
> > >
> > > so, my question is : what is expected ?
> should have added this:
>
> [root@t20 acl]# show
> # file: f
> user.filename="ascii2"
>
> # file: l
> user.filename="ascii2"
>
> setfattr: l: Operation not permitted
> setfattr: l: Operation not permitted
> # file: f
> user.filename="ascii2"
>
> # file: l
> user.filename="ascii2"
>
> [root@t20 acl]#
But note the following:
> > attr(5) specifically notes that USER EAs are disallowed on
> > symbolic links, but this is rather an issu that affects the
> > use of lsetxattr(2).
or setfattr if you specify "--no-dereference"...
There is a reason for this restriction: for a symbolic link, all
permissions are enabled for all users, and these permissions
cannot be changed. This means that permissions cannot be used (as
they would be with regular files) to prevent arbitrary users from
placing user EAs on a symbolic link. Thus all users are
prevented from creating user EAs on the symbolic link.
Michael
--
+++ Jetzt WLAN-Router für alle DSL-Einsteiger und Wechsler +++
GMX DSL-Powertarife zudem 3 Monate gratis* http://www.gmx.net/dsl
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: A question about extended attributes of filesystem objects (setfattr command)
2004-06-30 13:31 ` Michael Kerrisk
2004-06-30 14:04 ` Jacky Malcles
@ 2004-06-30 14:22 ` Jacky Malcles
1 sibling, 0 replies; 5+ messages in thread
From: Jacky Malcles @ 2004-06-30 14:22 UTC (permalink / raw)
To: Michael Kerrisk; +Cc: linux-kernel
Michael Kerrisk wrote:
>
> Gidday,
>
> > I have a question regarding
> > Attributes of symlinks vs. the files pointed to
> >
> > If I try to attach name:value pair to object symlink file
> > then I'll get: "Operation not permitted"
>
> What file system are you using? If ext2, ext3 (or patched kernel
> supporting Reiserfs EAs), did you mount with "-o user_xattr?
> (The above error suggests you haven't used this option.)
>
> > reading the man pages of setfattr (or attr) I thought that it operates
> > on the attributes of the symbolic link itself.
>
> No, these commands follow symbolic links.
>
> > show:
> > -----
> > touch f
> > ln -s f l
> > setfattr -n user.filename -v ascii1 f l
> > setfattr -h -n user.filename -v ascii2 f
> > getfattr -d f l
> > setfattr -h -n user.filename -v ascii3 l
> > setfattr -h --no-dereference -n user.filename -v ascii4 l
> > getfattr -d f l
> >
> > so, my question is : what is expected ?
>
thanks Michael,
below is what I was trying to find out !!
> attr(5) specifically notes that USER EAs are disallowed on
> symbolic links, but this is rather an issu that affects the
> use of lsetxattr(2).
>
> Cheers,
>
> Michael
>
> --
> "Sie haben neue Mails!" - Die GMX Toolbar informiert Sie beim Surfen!
> Jetzt aktivieren unter http://www.gmx.net/info
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
Jacky Malcles B1-403 Email : Jacky.Malcles@bull.net
Bull SA, 1 rue de Provence, B.P 208, 38432 Echirolles CEDEX, FRANCE
Tel : 04.76.29.73.14
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-06-30 14:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-30 12:52 A question about extended attributes of filesystem objects (setfattr command) Jacky Malcles
2004-06-30 13:31 ` Michael Kerrisk
2004-06-30 14:04 ` Jacky Malcles
2004-06-30 14:21 ` Michael Kerrisk
2004-06-30 14:22 ` Jacky Malcles
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox