Bug 15868 - MacOS finder unable to create directory, but "mkdir" works in terminal? DOSATTRIB related?
Summary: MacOS finder unable to create directory, but "mkdir" works in terminal? DOSAT...
Status: RESOLVED WONTFIX
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services (show other bugs)
Version: 4.22.0
Hardware: All FreeBSD
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-06-09 14:03 UTC by Peter Eriksson
Modified: 2025-06-11 12:13 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Eriksson 2025-06-09 14:03:21 UTC
We just noticed a strange problem where MacOS clients using Finder is enable to create new files/directories in some folders via Samba 4.19.9 even though the ACL/permssions is identical.

The problem seems to be in the parsing of the data in the xattr "DOSATTRIB" set on the directory in questions, because if I remove with things begin to work correctly again. And the folders that work have a 32 bytes DOSATTRIB whereas the ones that don't work have a 24 byte DOSATTRIB....


# getextattr -x user DOSATTRIB ThisOneWorks
ThisOneWorks	00 00 05 00 05 00 00 00 11 00 00 00 10 00 00 00 da a0 fc 93 fc ce db 01
# getextattr -x user DOSATTRIB Documents
Documents	00 00 04 00 04 00 00 00 51 00 00 00 11 00 00 00 9e 55 d7 72 85 12 d8 01 9e 55 d7 72 85 12 d8 01
# getextattr -x user DOSATTRIB Desktop
getextattr: Desktop: failed: Attribute not found

Via "Finder" on the Mac I can create new directories in ThisOneWorks and Desktop but not in Documents (doesn't display a "New folder" option when "right-clicking"). But "mkdir foo" works fine in all folders...

# lac ThisOneWorks Documents Desktop
# file: ThisOneWorks
# owner: peter86
# group: employee-liu.se
        everyone@:--------------:-------:allow
           owner@:rwxpDdaARWcCos:fd----I:allow

# file: Documents
# owner: peter86
# group: employee-liu.se
        everyone@:--------------:-------:allow
           owner@:rwxpDdaARWcCos:fd----I:allow

# file: Desktop
# owner: peter86
# group: employee-liu.se
        everyone@:--------------:-------:allow
           owner@:rwxpDdaARWcCos:fd----I:allow

(This feels a bit like a MacOS bug but anyway, I see no errors in the Samba log files).
Comment 1 Peter Eriksson 2025-06-09 14:06:35 UTC
Sigh - the other way around. The ones that work have a 24 byte DOSATTRIB and the ones that don't a 32 byte one.
Comment 2 Peter Eriksson 2025-06-11 12:13:22 UTC
Seems it is a MacOS issue with the Finder that has been there for ages.. 

Closing this bug report.

(Quick Solution is to just remove the DOSATTRIB attribute...)

It might have been nice to have some way to override the readonly attribute in Samba but since most users never notice this it's no big deal.