SV-278388r1171916_rule
V-278388
SRG-APP-000118
NGNX-APP-000400
CAT II
10
Determine the path to NGINX config file(s):
nginx -qT | grep "# configuration"
# configuration file /etc/nginx/nginx.conf:
Note: The default NGINX configuration is "/etc/nginx/nginx.conf", though various files may also be included.
Determine the location of the access and error logs:
grep "_log" <path to config>
Set appropriate permissions for the log files:
chmod 644 <path to error.log>
chmod 644 <path to access.log>
Determine the path to NGINX config file(s):
nginx -qT | grep "# configuration"
# configuration file /etc/nginx/nginx.conf:
Note: The default NGINX configuration is "/etc/nginx/nginx.conf", though various files may also be included.
Determine the location of the access and error logs:
grep "_log" <path to config>
Determine the permissions for the log files:
ls -la <path to error.log>
-rw-r--r-- 1 root root 0 May 23 15:04 /var/log/nginx/error.log
ls -la <path to access.log>
-rw-r--r-- 1 root root 0 May 23 15:04 /var/log/nginx/access.log
If files have write permissions for anyone other than the owner, this is a finding.
V-278388
False
NGNX-APP-000400
Determine the path to NGINX config file(s):
nginx -qT | grep "# configuration"
# configuration file /etc/nginx/nginx.conf:
Note: The default NGINX configuration is "/etc/nginx/nginx.conf", though various files may also be included.
Determine the location of the access and error logs:
grep "_log" <path to config>
Determine the permissions for the log files:
ls -la <path to error.log>
-rw-r--r-- 1 root root 0 May 23 15:04 /var/log/nginx/error.log
ls -la <path to access.log>
-rw-r--r-- 1 root root 0 May 23 15:04 /var/log/nginx/access.log
If files have write permissions for anyone other than the owner, this is a finding.
M
5720