--- /usr/share/pyshared/samba/ntacls.py.orig 2014-01-07 19:29:18.804000000 +0100 +++ /usr/share/pyshared/samba/ntacls.py 2014-01-07 19:52:24.648000000 +0100 @@ -117,10 +117,13 @@ sd2 = sd sd2.owner_sid = administrator - smbd.set_nt_acl(file, security.SECINFO_OWNER |security.SECINFO_GROUP | security.SECINFO_DACL | security.SECINFO_SACL, sd2, service=service) - - # and then set an NTVFS ACL (which does not set the posix ACL) to pretend the owner really was set - use_ntvfs = True + try: + smbd.set_nt_acl(file, security.SECINFO_OWNER |security.SECINFO_GROUP | security.SECINFO_DACL | security.SECINFO_SACL, sd2, service=service) + except Exception as exc: + print "set_nt_acl failed for %s: %s" % (file, exc) + else: + # and then set an NTVFS ACL (which does not set the posix ACL) to pretend the owner really was set + use_ntvfs = True else: raise XattrBackendError("Unable to find UID for domain administrator %s, got id %d of type %d" % (administrator, admin_id, admin_type)) else: @@ -151,7 +154,10 @@ samba.xattr_native.wrap_setxattr(file, xattr.XATTR_NTACL_NAME, ndr_pack(ntacl)) else: - smbd.set_nt_acl(file, security.SECINFO_OWNER | security.SECINFO_GROUP | security.SECINFO_DACL | security.SECINFO_SACL, sd, service=service) + try: + smbd.set_nt_acl(file, security.SECINFO_OWNER | security.SECINFO_GROUP | security.SECINFO_DACL | security.SECINFO_SACL, sd, service=service) + except Exception as exc: + print "set_nt_acl failed for %s: %s" % (file, exc) def ldapmask2filemask(ldm):