[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0708201803080.5333@fbirervta.pbzchgretzou.qr>
Date: Mon, 20 Aug 2007 18:12:11 +0200 (CEST)
From: Jan Engelhardt <jengelh@...putergmbh.de>
To: OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [patch] Refine FAT chmod checks
Hi,
On Aug 21 2007 00:17, OGAWA Hirofumi wrote:
>Jan Engelhardt <jengelh@...putergmbh.de> writes:
>> when a vfat filesystem is mounted without the quiet option, chown fails,
>> but chmod still succeeds. I think that is wrong.
>
>Could you explain why this is wrong more?
Suppose a vfat filesystem is mounted with umask=0 and [not-quiet].
Then all files will have mode 0777. Trying to change the owner will
fail, because fat does not know about owners or groups. chmod 0770,
on the other hand, will succeed, even though fat does not know about
the permission triplet [user/group/other].
So this patch changes fat's not-quiet behavior so that only UNIX
modes are accepted that can be mapped lossless between the fat disk
format and the local system. There is only one attribute, and that is
the readonly attribute, which is mapped to the UNIX write permission
bit(s). chmod 0555 is therefore valid (taking away the +w bits <=>
setting the readonly attribute). Since chmod 0775 and chmod 0755 is
an ambiguous case as to whether to set or clear the readonly bit,
these modes are also denied.
Does that help?
have a nice day,
Jan
--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists