Get owner/acl smb folder
anasbousselham opened this issue · 2 comments
anasbousselham commented
Hi,
I need to grab the owner name/SID and all the ACL data on a shared folder not files but only folder.
my little example:
tree = conn.connectTree("Data")
folder = conn.openFile(tree, '\\', READ_CONTROL , creationOption=FILE_LIST_DIRECTORY)
info = conn.getSMBServer().queryInfo(tree, folder, infoType=SMB2_0_INFO_SECURITY, fileInfoClass=SMB2_SEC_INFO_00, additionalInformation=OWNER_SECURITY_INFORMATION, flags=0)
sd = ldaptypes.SR_SECURITY_DESCRIPTOR()
sd.fromString(info)
print(f"{sd['OwnerSid']}")
I have this error: STATUS_ACCESS_DENIED({Access Denied} A process has requested access to an object but has not been garanted those access rights)
thanks
sec13b commented
what cmd u run ?
anadrianmanrique commented
can you provide more context about the target share? permissions ? windows version?