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