Bug 48863

Summary: Write access to VFAT-mounted directories is broken
Product: [Retired] Red Hat Linux Reporter: djh <djh>
Component: kernelAssignee: Arjan van de Ven <arjanv>
Status: CLOSED WONTFIX QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: low    
Version: 7.1CC: teg
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-06-06 14:39:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description djh 2001-07-12 08:54:04 UTC
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.

How Reproducible:
100% reproducible

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

Actual Results:
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.")

Expected Results:
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.

Additional Information:

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.

Comment 1 Trond Eivind Glomsrxd 2001-07-13 16:39:32 UTC
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)