LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Herbert Poetzl <herbert@13thfloor.at>
To: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: file attributes (ext2/3) in 2.4.26
Date: Fri, 21 May 2004 00:48:09 +0200 [thread overview]
Message-ID: <20040520224809.GA31445@MAIL.13thfloor.at> (raw)
In-Reply-To: <20040520215909.GB21344@logos.cnet>
On Thu, May 20, 2004 at 06:59:09PM -0300, Marcelo Tosatti wrote:
> On Mon, May 17, 2004 at 08:51:41PM +0200, Herbert Poetzl wrote:
> >
> > Hi Folks!
> >
> > is it intentional that the file attributes
> > (those accessible with chattr -*) are modifyable
> > even if a file has the 'i' immutable flag set,
> > and the user is lacking CAP_IMMUTABLE (or all
> > CAPs if you prefer that ;)
> >
> > # touch /tmp/x
> > # chattr +iaA /tmp/x
> >
> > # lcap -z
> > # chattr -i /tmp/x
> > chattr: Operation not permitted while setting flags on /tmp/x
> >
> > # chattr -A /tmp/x
> > # lsattr /tmp/x
> > ----ia------- /tmp/x
> >
> > I'd consider this a bug, but it might be some
> > strange posix/linux conformance issue too ...
> >
> > let me know if this _is_ a bug, if so, I'm
> > willing to provide patches to fix it ...
>
> Hi Herbert,
>
> The chattr man page says
>
> A file with the `i' attribute cannot be modified: it cannot be deleted
> or renamed, no link can be created to this file and no data can be
> written to the file. Only the superuser or a process possessing the
> CAP_LINUX_IMMUTABLE capability can set or clear this attribute.
>
> You still can modify other flags from the file, right?
yep, that is what I consider unexpected behavior, but the
man page doesn't say anything about other flags ...
in the example above (which should be easy to verify) the
'A' (noatime) flag is cleared while 'i' is set and the
user (root) has no capability at all ...
the same is true for all other attribute flags for
ext2/ext3, reiserfs and probably other fs implementing
those attributes.
best,
Herbert
next prev parent reply other threads:[~2004-05-20 22:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-17 18:51 file attributes (ext2/3) in 2.4.26 Herbert Poetzl
2004-05-20 21:59 ` Marcelo Tosatti
2004-05-20 22:48 ` Herbert Poetzl [this message]
2004-05-31 15:05 ` Marcelo Tosatti
2004-05-31 16:08 ` Herbert Poetzl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040520224809.GA31445@MAIL.13thfloor.at \
--to=herbert@13thfloor.at \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.tosatti@cyclades.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).