cannot write file to smb share

Description

writing files (same folder) with the same permissions (on src) to a share (same folder) fails for some files. TrueNAS system is domain joined.

Problem/Justification

None

Impact

None

Activity

Andrew Walker 
December 1, 2021 at 9:11 PM

Confirmed that issue resolved in Samba 4.15 once I updated VFS to support O_EMPTY_PATH.

Andrew Walker 
November 11, 2021 at 2:14 PM

It will not remove the kernel DOS attribute, but will cause samba to no longer read / set them. You can remove the kernel ones via chflags:

https://www.freebsd.org/cgi/man.cgi?query=chflags&sektion=1

That said, I'm still making a test build with Samba 4.15 to verify that the issue requires no further action. The problematic SMB operation very specific: creating a new file with READONLY specified in the SMB2_CREATE request, then attempting to write an alternate data stream with the open handle.

Steffen Koch 
November 11, 2021 at 1:41 PM

Okay. will try on a test share. Will that remove ANY existing DOS attributes?

Andrew Walker 
November 11, 2021 at 12:20 PM

You can try setting the following parameter on the share:
```
ixnas:dosattrib_xattr = true
```
And restart the SMB server.

This will cause us to stop using kernel dosmodes and instead store in an xattr. Enforcement may be less strict. Do note that this will effectively "remove" DOS attributes from files already written to the share.

Steffen Koch 
November 11, 2021 at 7:32 AM

Is there any known workaround? Something I can tweak in the samba settings maybe?

It would be tedious to remove all the RO bits on the files to be copied to the TrueNAS Box

Complete

Details

Assignee

Reporter

Labels

Time remaining

0m

Components

Fix versions

Affects versions

Priority

Katalon Platform

Created October 27, 2021 at 7:31 PM
Updated July 1, 2022 at 2:42 PM
Resolved December 1, 2021 at 9:14 PM