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

more of a question than an issue #18

Open
zerstoeren opened this issue Aug 18, 2017 · 4 comments
Open

more of a question than an issue #18

zerstoeren opened this issue Aug 18, 2017 · 4 comments

Comments

@zerstoeren
Copy link

I am wanting to use the debug information from smbc.Context in my code as part of research.

currently, i'm doing smbc.Context(debug=3) as it has the ability to provide some additional information regarding the SMB OID. any ideas how i might do this?

Thanks in advance.

@dshepherd21
Copy link

Am operating at the edge of my knowledge level here. Is there anything specific we need to do to get this working against CIFS DFS ? The call fails with DFSPATH not covered. Any hints woul be appreciated.

@zerstoeren
Copy link
Author

@dshepherd21 i also had trouble with CIFS using pysmbc, but had better success after i switched that section of code to the pysmb library. Maybe try that?

@venkatg70
Copy link

venkatg70 commented Feb 6, 2019

We have observed that on some occasions, the ace flag is incorrectly returned by the pysmbc smbc.Context.getxattr. The NTFS report on that folder reads the folder as inherited True for all the entries for that folder, but the pysmbc reads flag value=3 for all those entries. We expect flag=19 for those entries from pysmbc. It seems like pysmbc is not reading the control flags which would give us unequivocal values for the flag. (windows internal inconsistency?). Is there anything I am missing?

### NTFS output for a folder

Allow","This folder, subfolders and files","True","S-1-5-21-1010966800-777871707-395339515-6909","Traverse Folder / Execute File, List Folder / Read Data, Read Attributes, Read Extended Attributes, Create Files / Write Data, Create Folders / Append Data, Write Attributes, Write Extended Attributes, Delete, Read Permissions"

Z:\Projects\0800670 - Keewatinohk Camp Bldgs\Combined cost codes","\Projects\0800670 - Keewatinohk Camp Bldgs\Combined cost codes","Group","PCLINC\Cor District Office Operations Systems","N/A","Allow","This folder, subfolders and files","True","S-1-5-21-1010966800-777871707-395339515-6907","Traverse Folder / Execute File, List Folder / Read Data, Read Attributes, Read Extended Attributes, Create Files / Write Data, Create Folders / Append Data, Write Attributes, Write Extended Attributes, Delete, Read Permissions"

"Z:\Projects\0800670 - Keewatinohk Camp Bldgs\Combined cost codes","\Projects\0800670 - Keewatinohk Camp Bldgs\Combined cost codes","Group","PCLINC\Domain Admins","N/A","Allow","This folder, subfolders and files","True","S-1-5-21-1010966800-777871707-395339515-512","Full Control, Traverse Folder / Execute File, List Folder / Read Data, Read Attributes, Read Extended Attributes, Create Files / Write Data, Create Folders / Append Data, Write Attributes, Write Extended Attributes, Delete Subfolders and Files, Delete, Read Permissions, Change Permissions, Take Ownership"
"Z:\Projects\0800670 - Keewatinohk Camp Bldgs\Combined cost codes","\Projects\0800670 - Keewatinohk Camp Bldgs\Combined cost codes","Group","PCLINC\Win District Office All Users","N/A","Allow","This folder, subfolders and files","True","S-1-5-21-1010966800-777871707-395339515-2201","Traverse Folder / Execute File, List Folder / Read Data, Read Attributes, Read Extended Attributes, Create Files / Write Data, Create Folders / Append Data, Write Attributes, Write Extended Attributes, Delete, Read Permissions"

"Z:\Projects\0800670 - Keewatinohk Camp Bldgs\Combined cost codes","\Projects\0800670 - Keewatinohk Camp Bldgs\Combined cost codes","Group","PCLINC\Win District Office LAN Admins","N/A","Allow","This folder, subfolders and files","True","S-1-5-21-1010966800-777871707-395339515-11104","Full Control, Traverse Folder / Execute File, List Folder / Read Data, Read Attributes, Read Extended Attributes, Create Files / Write Data, Create Folders / Append Data, Write Attributes, Write Extended Attributes, Delete Subfolders and Files, Delete, Read Permissions, Change Permissions, Take Ownership"

"Z:\Projects\0800670 - Keewatinohk Camp Bldgs\Combined cost codes","\Projects\0800670 - Keewatinohk Camp Bldgs\Combined cost codes","Group","PCLINC\Win Region All Users","N/A","Allow","This folder, subfolders and files","True","S-1-5-21-1010966800-777871707-395339515-2197","Traverse Folder / Execute File, List Folder / Read Data, Read Attributes, Read Extended Attributes, Read Permissions"

### PYSMBC OUPUT of the call getxattr()
REVISION:1,OWNER:S-1-5-21-1010966800-777871707-395339515-3627038,GROUP:S-1-5-21-1010966800-777871707-395339515-513,ACL:S-1-5-21-1010966800-777871707-395339515-2197:**0/3/0x001200a9,**ACL:S-1-5-21-1010966800-777871707-395339515-2201:0/3/0x001301bf,ACL:S-1-5-21-1010966800-777871707-395339515-6907:**0/3/0x001301bf,**ACL:S-1-5-21-1010966800-777871707-395339515-6909:**0/3/0x001301bf,**ACL:S-1-5-21-1010966800-777871707-395339515-512:0/3/0x001f01ff,ACL:S-1-5-21-1010966800-777871707-395339515-11104:0/3/0x001f01ff

@hamano hamano pinned this issue Feb 13, 2019
@hamano hamano unpinned this issue Mar 18, 2020
@anagda3
Copy link

anagda3 commented Mar 16, 2023

Hi @hamano ,

I have one similar case. When I use smbcacls, I see detailed about control-bits.

smbcacls //server/folder sub-folder -U administrator%password

REVISION:1
CONTROL:SR|DI|DP
OWNER:Administrators
GROUP:WIN-USERS\None
ACL:user:ALLOWED/OI|CI|I/CHANGE

However, when I use the getxattr method of the pysmbc lib, I don't see the control field in the response. Any comment on this?

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

4 participants