Hi, Recently I have faced an Error code 87 in two different instances.
Instance 1 :
I was trying to apply SACL of a folder named "Test_Folder" using Cacls.exe, It returned the error : 87 , Then I found that the folder is having 1820 DACL's and after referring this document : https://learn.microsoft.com/en-us/troubleshoot/windows-server/windows-security/error-add-user-to-security-permissions confimed that why this error came.
Instance 2 :
I have written a CPP file to set SACL for an share/folder say "temp_folder" using Win API (https://learn.microsoft.com/en-us/windows/win32/api/aclapi/nf-aclapi-setentriesinacla)) , the "temp folder" doesnot have more than 10 ACLs and 0 SACLs before applying, I have tried to apply the SACL using that CPP file it didn't work and returns error 87 , but for other shares/folder it works well and SACL applied without any error and the parameters inserted are correct as I checked. In this instance I cannot able to find where the actual issue is.
By referring the above two instances , It returns only the Error code 87 if error encountered, But the error does not say where and why the actual error is coming , Kindly someone guide me how to analyse the error parameter is incorrect.