AAM - Log files reset permissions when Provider service is restarted
Symptom
After a restart of the Provider service on Linux CP, the log files found under /var/opt/CARKaim/logs reset their permissions.
This can cause users that are used to monitor these files (Splunk for example) to lose permissions to read these files.
Environment
Privileged Access Manager (PAM, self-hosted) Credential Provider Unix CP
Cause
Normally when the Provider service is restarted, the log files will rotate and start with fresh logs. In some cases it has been seen that the permissions for users on these files are also reset when the new log files are created.
Resolution
There is a workaround for this issue, but it includes adding a ACL (Access Control List) on the logs directory so that any new logs that are created (for example after a service restart) will automatically set the correct permissions to those logs for the monitor user.
setfacl -dm "u:[monitor user]:r-x" /var/opt/CARKaim/logs
Example command:
[root@CentOS7-Template logs]# setfacl -dm "u:monitor:r-x" /var/opt/CARKaim/logs
[root@CentOS7-Template logs]# getfacl /var/opt/CARKaim/logs
getfacl: Removing leading '/' from absolute path names
# file: var/opt/CARKaim/logs
# owner: root
# group: bin
user::rwx
user:monitor:r-x
group::r-x
mask::r-x
other::r-x
default:user::rwx
default:user:monitor:r-x
default:group::r-x
default:mask::r-x
default:other::r-x
===
To test, please restart the Provider service after running the above command, and see if the monitor user has the correct permissions assigned to the logs directory.