Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get owner/acl smb folder #1693

Open
anasbousselham opened this issue Jan 31, 2024 · 2 comments
Open

Get owner/acl smb folder #1693

anasbousselham opened this issue Jan 31, 2024 · 2 comments
Labels
waiting for response Further information is needed from people who opened the issue or pull request

Comments

@anasbousselham
Copy link

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
Copy link

sec13b commented Feb 15, 2024

what cmd u run ?

@anadrianmanrique
Copy link
Contributor

can you provide more context about the target share? permissions ? windows version?

@anadrianmanrique anadrianmanrique added the waiting for response Further information is needed from people who opened the issue or pull request label Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for response Further information is needed from people who opened the issue or pull request
Projects
None yet
Development

No branches or pull requests

3 participants