Re: utimes() with vfat is problematic

From: Pawel Dziepak
Date: Tue Jul 10 2007 - 06:18:29 EST


2007/7/10, Jan Engelhardt <jengelh@xxxxxxxxxxxxxxx>:
I am not sure how this could be dealt with besides passing -o quiet to
mount.vfat. Any ideas?

The problem is in the function utimes. I have mounted vfat partition
as a root, then changed permissions to 777 for all files. However, I
wasn't be able to touch any file (changing date to the past) as a
normal user. utimes() should check write permission instead of uid/
I didn't read 'touch' source code and it is probably caused by it's
procedures that I was able to change modification date to the current
date.
Single UNIX Specification says crealy that to do utimes on a file user
have to had write permissions or be a file owner.

Pawel
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/