PSM Hardening Failure Error PSMHRD004 Failed to remove permissions of folder/file. Path: C:\oracle

PSM Hardening Failure Error PSMHRD004 Failed to remove permissions of folder/file. Path: C:\oracle

196
Created On 11/10/26 11:00 AM - Last Modified 11/10/26 16:01 PM


Symptom


The PSM Hardening Script will run and in the failure of that script - this error will be called out :

ERROR - Could not change permissions on C:\oracle to account Users
Error PSMHRD004 Failed to remove permissions of folder/file. Path: C:\oracle


Privilege connector version is 12.7. Error occurred during PSM Hardening as below. 111422 101905 [6696] System.Management.Automation.MethodInvocationException: Exception calling "RemoveAccessRule" with "1" argument(s): "The value '-536805376' is not valid for this usage of the type FileSystemRights. Parameter name: fileSystemRights" ---> System.ArgumentOutOfRangeException: The value '-536805376' is not valid for this usage of the type FileSystemRights. Parameter name: fileSystemRights at System.Security.AccessControl.FileSystemAccessRule.AccessMaskFromRights(FileSystemRights fileSystemRights, AccessControlType controlType) at System.Security.AccessControl.FileSystemSecurity.RemoveAccessRule(FileSystemAccessRule rule) at CallSite.Target(Closure , CallSite , Object , Object ) --- End of inner exception stack trace --- at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception) at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) 111422 101905 [6696] ERROR - Could not change permissions on C:\oracle to account Users 111422 101905 [6696] Error message: PSMHRD004 Failed to remove permissions of folder/file. Path: C:\oracle


Environment


12.7 Privilege Cloud PSM

Privilege Cloud | Shared Services ISPSS



Cause


The Hardening Script runs into issues Applying the Following permissions to C:\oracle 

Applies the following on C:\oracle
Adds an access rule for PSMShadowUsers to Allow ReadAndExecute and Synchronize.
Adds an access rule for PSMShadowUsers to Deny DeleteSubdirectoriesAndFiles, Write, Delete, ChangePermissions and TakeOwnership.

The permissions are noted here :

https://docs.cyberark.com/Product-Doc/OnlineHelp/PrivCloud-SS/Latest/en/Content/Security/PSM-hardening-configuration.htm


Resolution


Potentially actioning one or more of the following in two parts  :

A)
1) Add users group with full permissions on c:\oracle
2) Create PSMShadowUsers group manually, and assign the group full permission to this folder c:\oracle

B) Run the PSM Hardening Script Again


Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA1hj0000001DBOCA2&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail