after more thought regarding xattrs, i looked at the sementecs regarding users changing traditional attributes on world writable files they don't own, in this case mtime and noticed a bug in XFS. on ext2 filesystems if i attempt to set the mtime of a file i don't own (but do have write permission to) to anything but the current time i get -EPERM, but on XFS im allowed to do whatever i want: eb@dogbert ~$ mount | grep -w / /dev/hda3 on / type xfs (rw) eb@dogbert ~$ mount | grep /mnt /dev/hda4 on /mnt type ext2 (rw) eb@dogbert ~$ ls -l /dev/null /mnt/null crw-rw-rw- 1 root root 1, 3 Jun 28 2001 /dev/null crw-rw-rw- 1 root root 1, 3 Apr 5 23:47 /mnt/null eb@dogbert ~$ touch -r /etc/passwd /mnt/null touch: setting times of `/mnt/null': Operation not permitted eb@dogbert ~$ touch -r /etc/passwd /dev/null eb@dogbert ~$ ls -l /etc/passwd /dev/null crw-rw-rw- 1 root root 1, 3 Feb 16 06:00 /dev/null -rw-r--r-- 1 root root 1408 Feb 16 06:00 /etc/passwd eb@dogbert ~$ ls -l /dev/null /mnt/null crw-rw-rw- 1 root root 1, 3 Feb 16 06:00 /dev/null crw-rw-rw- 1 root root 1, 3 Apr 5 23:47 /mnt/null eb@dogbert ~$ the same is true for setting time in the future, also the same applies to normal files as opposed to regular files. -- Ethan Benson http://www.alaska.net/~erbenson/
Attachment:
pgp00002.pgp
Description: PGP signature