PVWA - Servers fail to load with 'CASTM053E Unexpected error in ChageToRandomPasswordFromFile: [New password could not be written to file] code [4]' in Windows application event log
105
Created On 11/10/26 10:55 AM - Last Modified 11/10/26 16:04 PM
Symptom
PVWA fails to load and no logs are written to CyberArk.WebApplication.log or CyberArk.WebConsole.log.
The following error appears in the Windows Application event logs for CyberArk.Casos.dll:
CASTM053E Unexpected error in ChageToRandomPasswordFromFile: [New password could not be written to file] code [4], Reason: CASLG004E Failed to open log file [E:\Program Files (x86)\CyberArk\Idira Password vault web Access\Logs\CyberArk.WebApplication.log]. Code [5].
Environment
9.10 Password Vault Web Access
Cause
The PVWA lost permissions to write to its own logs. This prevents the PVWA credential files from being able to update.
Also, if the PVWA App User accounts are not set to "Never expire" in PrivateArk Client, the credentials will then expire as well.
Resolution
Check the permissions on the old logs, they should have the following:
SYSTEM - Full Control
Administrators (HOSTNAME\Administrators) - Full Control
IIS_IUSRS (HOSTNAME\IIS_IUSRS) - Special permissions
PasswordVaultWebAccessPool - Full control
Administrators (HOSTNAME\Administrators) - Full Control
IIS_IUSRS (HOSTNAME\IIS_IUSRS) - Special permissions
PasswordVaultWebAccessPool - Full control
Note the date of the last line written for RCA--many times this occurs because a domain policy changed the permission.
You can either set the permissions back or rename/move/delete the old logs so that new ones are generated with the correct permissions. Console logs should then generate.