linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* utimes() with vfat is problematic
@ 2007-07-10  9:47 Jan Engelhardt
  2007-07-10 10:18 ` Pawel Dziepak
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Engelhardt @ 2007-07-10  9:47 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: Linux Kernel Mailing List, hirofumi

Hi,



vfat does not know about ownership, hence the files are always owned by the
vfat mounter (or whatever the uid= 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:


fs/attr.c:53
	ret = -EPERM;
	[...]

	/* Check for setting the inode time. */
	if (ia_valid & (ATTR_MTIME_SET | ATTR_ATIME_SET)) {
		if (current->fsuid != inode->i_uid && !capable(CAP_FOWNER))
                        goto error;
        }


To trigger the problem:
	# mount /somevfat -o umask=0,uid=root
	$ touch -d "2005-05-05" /somevfat/myfile

I am not sure how this could be dealt with besides passing -o quiet to 
mount.vfat. Any ideas?



	Jan
-- 

^ permalink raw reply	[flat|nested] 5+ messages in thread
[parent not found: <8Fkwa-6BT-29@gated-at.bofh.it>]

end of thread, other threads:[~2007-07-11 11:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-10  9:47 utimes() with vfat is problematic Jan Engelhardt
2007-07-10 10:18 ` Pawel Dziepak
2007-07-10 16:38   ` Jan Engelhardt
2007-07-10 16:54     ` Pawel Dziepak
     [not found] <8Fkwa-6BT-29@gated-at.bofh.it>
2007-07-11 11:49 ` Bodo Eggert

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