ONTAP Rest API Discussions

/api/protocols/file-security/permissions and missing SID

Oc77
457 Views

Hello,

 

I'm trying to display file permissions using rest-api. I have an old vserver and it does not work when SECD cannot resolve SID. It's fine using ZAPI.  It displays SID when it cannot resolve to windows name. 

 

GET https://ip/api/protocols/file-security/permissions/c26b5fac-1135-11ea-a956-00a098d1acc2/%2FVOLUME%2FDIR%2FSUBDIR
User-Agent: python-requests/2.28.1
Accept-Encoding: gzip, deflate
Accept: */*
Connection: keep-alive
X-Dot-Client-App: netapp-ontap-python-9.11.1.0
Authorization: Basic aW52ZW50YWlyZTpZb3VwbGFib3VtMzA=
None
-----------------------------
DEBUG:charset_normalizer:Encoding detection: ascii is most likely the one.
DEBUG:netapp_ontap.host_connection:
-----------RESPONSE-----------
404 Not Found
Date: Thu, 02 Feb 2023 10:48:14 GMT
Server: libzapid-httpd
X-Content-Type-Options: nosniff
Cache-Control: no-cache,no-store,must-revalidate
Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; frame-ancestors: 'self'
Content-Length: 144
Content-Type: application/hal+json
Keep-Alive: timeout=5, max=99
Connection: Keep-Alive
{
"error": {
"message": "Failed to convert SID to a Windows name. Reason: \"SecD Error: object not found\". ",
"code": "4849677"
}
}
------------------------------
Traceback (most recent call last):
File "/home/XXXXXX/projects/reporting_acls/test.py", line 14, in <module>
resource.get()
File "/srv/xxxxx/venv/netapp/lib/python3.9/site-packages/netapp_ontap/resources/file_directory_security.py", line 1048, in get
return super()._get(**kwargs)
File "/srv/xxxxx/venv/netapp/lib/python3.9/site-packages/netapp_ontap/utils.py", line 55, in wrapper
return on_api_fail(erro)
File "/srv/xxxxx/venv/netapp/lib/python3.9/site-packages/netapp_ontap/utils.py", line 78, in on_api_fail
raise NetAppRestError(cause=erro) from None
netapp_ontap.error.NetAppRestError: Caused by HTTPError('404 Client Error: Not Found for url: https://IP:443/api/protocols/file-security/permissions/c26b5fac-1135-11ea-a956-00a098d1acc2/%2FVOLUME%2FDIR%2FSUBDIR'): Failed to convert SID to a Windows name. Reason: "SecD Error: object not found".






 

 

 

1 ACCEPTED SOLUTION

ddegraaf
187 Views

Have you tried using /administrator/windows in the file-security path, like:

GET https://ip/api/protocols/file-security/effective-permissions/cf5f271a-1beb-11ea-8fad-005056bb645e/administrator/windows/%2F?share.name=sh1&return_records=true

 

View solution in original post

1 REPLY 1

ddegraaf
188 Views

Have you tried using /administrator/windows in the file-security path, like:

GET https://ip/api/protocols/file-security/effective-permissions/cf5f271a-1beb-11ea-8fad-005056bb645e/administrator/windows/%2F?share.name=sh1&return_records=true

 

Public