[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#278068: chmod messes up permissions on hfs filesystem



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


-- 
Horms



Reply to: