SV-259172r935420_rule
V-259172
SRG-APP-000118-DB-000059
VCPG-80-000020
CAT II
10
A script is included with vCenter to generate a PostgreSQL STIG configuration.
At the command prompt, run the following commands:
# chmod +x /opt/vmware/vpostgres/current/bin/vmw_vpg_config/vmw_vpg_config.py
# /opt/vmware/vpostgres/current/bin/vmw_vpg_config/vmw_vpg_config.py --action stig_enable --pg-data-dir /storage/db/vpostgres
# chmod -x /opt/vmware/vpostgres/current/bin/vmw_vpg_config/vmw_vpg_config.py
Restart the PostgreSQL service by running the following command:
# vmon-cli --restart vmware-vpostgres
At the command prompt, run the following commands:
# chmod 600 <file>
# chown vpostgres:vpgmongrp <file>
Note: Replace <file> with the file that has incorrect permissions.
Verify the default log file permissions and permissions on existing log files.
At the command prompt, run the following command:
# /opt/vmware/vpostgres/current/bin/psql -U postgres -A -t -c "SHOW log_file_mode;"
Expected result:
0600
If "log_file_mode" is not set to "0600", this is a finding.
At the command prompt, run the following command:
# find /var/log/vmware/vpostgres/* -xdev -type f -a '(' -not -perm 600 -o -not -user vpostgres -o -not -group vpgmongrp ')' -exec ls -ld {} \;
If any files are returned, this is a finding.
V-259172
False
VCPG-80-000020
Verify the default log file permissions and permissions on existing log files.
At the command prompt, run the following command:
# /opt/vmware/vpostgres/current/bin/psql -U postgres -A -t -c "SHOW log_file_mode;"
Expected result:
0600
If "log_file_mode" is not set to "0600", this is a finding.
At the command prompt, run the following command:
# find /var/log/vmware/vpostgres/* -xdev -type f -a '(' -not -perm 600 -o -not -user vpostgres -o -not -group vpgmongrp ')' -exec ls -ld {} \;
If any files are returned, this is a finding.
M
5570