[Samba] Can't change directory owner

Andrea Cucciarre acucciarre at cloudian.com
Tue Feb 7 12:23:32 UTC 2023


Hello,

I am struggling to change the owner of directories in Samba share, from a
windows client.
In the Samba logs I can see the following error message:

[2023/02/06 13:23:31.624803,  3]
../../source3/modules/nfs4_acls.c:1042(smb_set_nt_acl_nfs4)
  chown New folder, 11150, 4294967295 failed. Error =
NT_STATUS_INVALID_OWNER.

This points to the try_chown() in samba code, and as far as I can see it
should allow the chown if the user has the SeRestorePrivilege.
>From windows I have added the SeRestorePrivilege to that user, and actually
it seems samba can see it:

# net rpc rights list 'DOMAIN\user' -S X.X.X.X -U Administrator
SeBackupPrivilege
SeRestorePrivilege

So I can't understand why Samba doesn't recognize the SeRestorePrivilege
when handling a chown.


Regards
Andrea


More information about the samba mailing list