Bug 15845 - NT_STATUS_INVALID_PARAMETER: Can't create folders on share of an exfat file system
Summary: NT_STATUS_INVALID_PARAMETER: Can't create folders on share of an exfat file s...
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services (show other bugs)
Version: 4.22.0
Hardware: Other Linux
: P5 normal (vote)
Target Milestone: ---
Assignee: Jule Anger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-06 15:34 UTC by Andreas Kuropka
Modified: 2025-04-17 17:24 UTC (History)
2 users (show)

See Also:


Attachments
server log file (3.18 KB, text/plain)
2025-04-06 15:34 UTC, Andreas Kuropka
no flags Details
fix for 4.22 (1.31 KB, patch)
2025-04-17 12:21 UTC, Björn Jacke
metze: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Kuropka 2025-04-06 15:34:16 UTC
Created attachment 18628 [details]
server log file

System: Arch Linux Arm on Raspberry Pi 5 (aarch64)

Error message on client: "The file '<%1 NULL:NameDest>' is too large for
the destination file system"

Steps to reproduce:
1. mount exfat file system (kernel driver or exfat-fuse)
2. create share on mounted file system
3. try to create or copy a folder to the share (e.g. from Windows)

Additional comments:
- Bug is newly introduced in 4.22.0 (4.21.5 and before works fine).
- All other operations including renaming or deleting folders are not affected.
Comment 1 Ralph Böhme 2025-04-06 17:07:36 UTC
Can you try setting

vfs mkdir use tmp name = no

for the share?
Comment 2 Andreas Kuropka 2025-04-06 17:22:56 UTC
With this directive it works again.
Comment 3 Ralph Böhme 2025-04-06 17:30:04 UTC
Great! I guess there's not much more we can do. Afaict we can't easily detect this automatically that the filesystem we're sharing has a restricted characterset.
Comment 4 Andreas Kuropka 2025-04-06 17:57:45 UTC
Thanks for guiding the right way...

However, the issue occurs due to the colons included in the temporary name. While this is a valid character on linux filesystems the error should be thrown on all Microsoft developed ones, including fat(32) and ntfs. This may be quite some restriction of the default setting.

Using a different commonly accepted character such as an underscore would be an overall and in my idea easy solution. Alternatively the underlying filesystem can be checked with 'stat' to avoid using an illegal character.

A third but for the user less convenient solution would be referencing this limitation in the man pages.

Just my two cents.
Comment 5 Samba QA Contact 2025-04-17 11:31:14 UTC
This bug was referenced in samba master:

c2b74ef093aff6175ef8e4572a203e5beacc527f
Comment 6 Björn Jacke 2025-04-17 12:21:51 UTC
Created attachment 18634 [details]
fix for 4.22
Comment 7 Jule Anger 2025-04-17 13:21:49 UTC
Pushed to autobuild-v4-22-test.
Comment 8 Samba QA Contact 2025-04-17 17:04:30 UTC
This bug was referenced in samba v4-22-test:

417feb2851a8d42d47577dc2446ada7d9b9849bb
Comment 9 Samba QA Contact 2025-04-17 17:17:03 UTC
This bug was referenced in samba v4-22-stable (Release samba-4.22.1):

417feb2851a8d42d47577dc2446ada7d9b9849bb
Comment 10 Jule Anger 2025-04-17 17:24:21 UTC
Closing out bug report.

Thanks!