in samba 4.14 inherit owner is no longer working correctly on directories. They are created with the ownership of the creating user instead of the ownership of the parent directory. In 4.13 this was still working fine.
I have a slight suspicion that this *may* be related to: https://bugzilla.samba.org/show_bug.cgi?id=14732 any chance you can pull the patch from that and re-test ?
I tried but it doesn't fix this issue unfortunately
OK, then can you post the smb.conf and exact steps you used to reproduce ? Thanks.
/tmp/t is root owned, chmod 777 like this: drwxrwxrwx 4 root root 4096 Jun 9 18:35 . [tmptest] path=/tmp/t read only = no inherit owner = yes inherit permissions = yes in my case it was a simple security = ads joined member server. creating a file results in a root owned file. creating a folder results in the connected user being the owner.
(In reply to Björn Jacke from comment #4) Can we see the [global] part of your smb.conf ? I ask this because it works for me. pi@rpi400:~ $ samba -V Version 4.14.5-Debian pi@rpi400:~ $ ls -la /tmp/t total 32 drwxrwxrwx 4 root root 4096 Jun 9 19:09 . drwxrwxrwt 16 root root 4096 Jun 9 19:07 .. -rwxrwxr-x+ 1 root root 0 Jun 9 19:09 test2.txt drwxrwxr-x+ 2 root root 4096 Jun 9 18:57 testdir drwxrwxr-x+ 2 root root 4096 Jun 9 19:09 testdir2 -rwxrwxr-x+ 1 root root 0 Jun 9 18:57 test.txt
OK, I'm 100% sure this is the mkdir_internal() using pathref_fsp I just discovered and fixed in master. I also have a test :-). I'll back-port as I think the fix will be different to the one in master.
Created attachment 16646 [details] git-am fix for 4.14.next. Ralph, I think this is the fix. Doh....
Comment on attachment 16646 [details] git-am fix for 4.14.next. Björn, can you confirm ?
For master: https://gitlab.com/samba-team/devel/samba/-/pipelines/318071364
Comment on attachment 16646 [details] git-am fix for 4.14.next. wow, thanks for the quick fix! Looks good for me now! :)
Karo, please schedule this for 4.14
(In reply to Björn Jacke from comment #11) Pushed to autobuild-v4-14-test.
(In reply to Karolin Seeger from comment #12) Can you cancel the autobuild? This is patch is not even in master yet... It's very likely correct, but I still need to review this.
(In reply to Ralph Böhme from comment #13) Removed for now
oops, I didn't notice that, sorry... 8-)
Created attachment 16652 [details] git-am fix for 4.14.next. Updated patch with cherry-pick refspec's from master. (fchmod needed a slight back-port as the cherry-pick didn't apply cleanly).
(In reply to Jeremy Allison from comment #16) Pushed to autobuild-v4-14-test.
This bug was referenced in samba v4-14-test: f8c4bcb0b22d3c20419bec2f175785266e629f3a
This bug was referenced in samba v4-14-stable (Release samba-4.14.6): f8c4bcb0b22d3c20419bec2f175785266e629f3a
Closing out bug report. Thanks!