From: Horms <horms@verge.net.au>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Roman Zippel <zippel@linux-m68k.org>,
Siep Kroonenberg <siepo@cybercomm.nl>,
278068@bugs.debian.org
Subject: Re: chmod messes up permissions on hfs filesystem
Date: Mon, 1 Nov 2004 20:05:22 +0900 [thread overview]
Message-ID: <20041101110516.GA13658@verge.net.au> (raw)
In-Reply-To: <20041101043559.GA12500@verge.net.au>
On Mon, Nov 01, 2004 at 01:35:59PM +0900, Horms wrote:
> On Sun, Oct 24, 2004 at 05:21:44PM +0200, Siep Kroonenberg wrote:
> > Package: kernel-image-2.6.8-powerpc Version: 2.6.8-6 Severity: normal
> >
> >
> > chmod commands on files on hfs partitions tend to give weird results,
> > e.g.:
> >
> > original: -rw-r--r--
> > after chmod g+w:
> > -----w--w-
> > after chmod g-w:
> > ----------
> > after unmounting and remounting the partition:
> > -r--r--r--
> >
> > I assume this is kernel-related, since with a 2.4 kernel, chmod
> > commands mostly got ignored on this hfs partition. Anyhow, the
> > maintainer of coreutils doesn't consider this a problem with chmod.
>
> That is very strange indeed. I have sent this on to LKML so see if he has
> any ideas.
>
> From reading hfs_inode_setattr() in fs/hfs/inode.c I observe that, it
> only honours changes for the write flag, and it changes the global,
> group and user flag simultaneously. I guess HFS only has one permission
> flag, write, which can be on or off. The relevant code in the hfs tree
> doesn't seem to have changed for many moons, so either it has always
> been broken in 2.6 or something strange has happened elsewhere.
>
> In any case the behaviuor describe above is weird and should work
> more along the lines of.
>
> -rw-r--r--
> after chmod g+w:
> -rw-rw-rw-
> after chmod g-w:
> -r--r--r--
> after unmounting and remounting the partition:
> -r--r--r--
I took a closer look into this and it seems to be caused by completely
bogus handling of the umask and dirmask of the fs which is set
at mount time and supposed to control the default permisions of files.
I am working on a patch to resolve this.
--
Horms
next prev parent reply other threads:[~2004-11-01 11:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-01 4:35 Horms
2004-11-01 11:05 ` Horms [this message]
2004-11-01 16:27 ` Roman Zippel
2004-11-02 3:56 ` Horms
2004-11-03 16:00 ` Roman Zippel
2004-11-04 3:31 ` Horms
2004-11-04 4:35 ` Horms
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=20041101110516.GA13658@verge.net.au \
--to=horms@verge.net.au \
--cc=278068@bugs.debian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=siepo@cybercomm.nl \
--cc=zippel@linux-m68k.org \
/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
all inboxes | Powered by JetHome®