From: Bodo Eggert <7eggert@gmx.de> Subject: Re: utimes() with vfat is problematic Date: Wed, 11 Jul 2007 13:49:03 +0200 Message-ID: References: <8Fkwa-6BT-29@gated-at.bofh.it> Reply-To: 7eggert@gmx.de Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE To: Jan Engelhardt , Linux Kernel Mailing List , hirofumi@mail.parknet.co.jp, linux-fsdevel@vger.kernel.org Return-path: Received: from moutng.kundenserver.de ([212.227.126.177]:56931 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760329AbXGKLtX (ORCPT ); Wed, 11 Jul 2007 07:49:23 -0400 Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Jan Engelhardt wrote: > vfat does not know about ownership, hence the files are always owned = by the > vfat mounter (or whatever the uid=3D option specified). Which brings > a problem to userspace programs trying to utime() but which do not > run as the same user as the vfat mounter, because: >=20 >=20 > fs/attr.c:53 > ret =3D -EPERM; > [...] >=20 > /* Check for setting the inode time. */ > if (ia_valid & (ATTR_MTIME_SET | ATTR_ATIME_SET)) { > if (current->fsuid !=3D inode->i_uid && !capable(CAP_FOWNER)) > goto error; > } >=20 >=20 > To trigger the problem: > # mount /somevfat -o umask=3D0,uid=3Droot > $ touch -d "2005-05-05" /somevfat/myfile >=20 > I am not sure how this could be dealt with besides passing -o quiet t= o > mount.vfat. Any ideas? Would it be possible to allow any user to modify the fs by adding "&& current->fsuid !=3D -1"? I think it's commonly the desired behaviou= r. Off cause the default behaviour should stay the same. --=20 Those who hesitate under fire usually do not end up KIA or WIA.=20 =46ri=DF, Spammer: pof@7o.7eggert.dyndns.org jhojzbk@I.7eggert.dyndns.o= rg ysoMi@qRIeghz.7eggert.dyndns.org a-r@s.7eggert.dyndns.org - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html