Date: Sat, 22 Jul 1995 09:49:33 -0700 From: Matt Dillon <dillon@blob.best.net> To: bugs@freebsd.org Subject: Here's a new one: /bin/mv truncates destination if dest is NFS Message-ID: <199507221649.JAA11816@blob.best.net>
index | next in thread | raw e-mail
Here's another one... /bin/mv truncates the destination file if
the destination is an NFS filesytem.
* Create a 24254 byte file
* as root, chgrp the file to a group the user has no permissions on
* as the user, /bin/mv file dest
where dest is on an NFS mount.
What happens is that the fchown() that /bin/mv does blows away the
last dirty buffer from the filecopy (which used 8K chunks) that /bin/mv
did, so the output file winds up being only 16K long!!
This only occurs when fchown() fails due to not being able to transfer
the group permissions to the destination file, i.e. when you get:
mv2: /home/au/z: set owner/group: Operation not permitted
If I put a sleep() in just before the fchown() and manually /bin/sync
after the file is written but before the fchown(), the file size comes
out properly.
-Matt
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199507221649.JAA11816>
