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

getxattr() fails to retrieve the ACLs for SMB Azure File Share #65

Open
parthsompura opened this issue Feb 5, 2024 · 0 comments
Open

Comments

@parthsompura
Copy link

parthsompura commented Feb 5, 2024

Hi Team,

We are trying to use pysmbc for getting meta-data of SMB Azure File Share and it's able to hit the opendir() call to retrieve the children but failed with RuntimeError: (61, 'No data available') when tried hitting getxattr() requesting the file/folder ACLs

>>> import smbc
>>> context = smbc.Context()
>>> cb = lambda se, sh, w, u, p: (domain_name, azure_file_share_name, azure_file_share_access_key)
>>> context.opendir("smb://AZURE_FILE_SHARE_PATH").getdents()
[<smbc.Dirent object "." (Dir) at 0x7fe36920eb50>, <smbc.Dirent object ".." (Dir) at 0x7fe36920ee20>, <smbc.Dirent object "Tmp" (Dir) at 0x7fe3645ebe40>]
>>> context.getxattr("smb://AZURE_FILE_SHARE_PATH", smbc.XATTR_ALL)
cli_nt_session_open fail!
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: (61, 'No data available')

I increased the debug-level to 5, and compare it with smbcacls debug logs, but the ultimate result was the same. cli_nt_session_open fail in pysmbc

We are able to retrieve the ACLs for the SMB Azure File Share using smbcacls so ideally we should be able to achieve the same using pysmbc hence To DEBUG further, we have captured the TCPdump and noticed that we couldn't notice any SEC_INFO (to fetch ACL info) calls in pysmbc tcpdumps. We only see the FS_INFO call, which retrieves file/folder details.

cc: @debjit-bhattacharjee @anagda3

@parthsompura parthsompura changed the title getxattr() fails to retrieve the permissions for SMB Azure File Share getxattr() fails to retrieve the ACLs for SMB Azure File Share Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant