2.3.2 Ensure access to NGINX directories and files is restricted

Warning! Audit Deprecated

This audit has been deprecated and will be removed in a future update.

View Next Audit Version

Information

Permissions on the /etc/nginx directory should enforce the principle of least privilege.

Rationale:

This ensures that only users who need access to configuration files are able to view them, thus preventing unauthorized access. Other users will need to use sudo in order to access these files.

Solution

To set permissions to least privilege on the nginx configuration files, issue these commands:

find /etc/nginx -type d | xargs chmod 750
find /etc/nginx -type f | xargs chmod 640

See Also

https://workbench.cisecurity.org/files/2275