Description of Problem:
When sharing a directory on a VFAT-mounted fs via samba with any 2.4.x kernel, writes to that shared drive will usually fail. Changes introduced into the kernel somewhere after 2.4.0-test12 break growing ftruncate()s on VFAT-mounted filesystems.
Steps to Reproduce:
1. share a local VFAT directory via samba (with appropriate permissions)
2. copy a large-ish file from a win98se client to the shared directory
3. watch the permission denied message appear
It doesn't work. ("Cannot create or replace <file> Access is denied. Make sure the disk is not full or write-protected and that the file is not currently in use.")
It should work, or at least be documented as not working. It does with 2.2.x (last time I tried), and early 2.4.0-test kernels.
I meant to report this about 7 months ago (whoops). I'm still not sure whether this should be filed under kernel or samba, and I'm even less sure that anyone really cares about this problem. But IMVHO, one of the following things should be done:
- it should be documented somewhere that it's broken
- growing truncates should be fixed on FAT filesystems (IIRC, Al Viro made an experimental patch a long time ago)
Others have suggested that the application needs fixing, as it's relying on undocumented behaviour. Another suggestion was to use a decent fs instead. :)
This is related to bug #39547. If it's not going to be fixed, it should at least be documented as not working.
Using truncate to increase file size is not allowed in the 2.4 kernel, and is
not a bug in samba... reassigning to kernel (but I doubt they'll say much more
than "your application is broken", which is true enough)