I seem to have encountered an issue with the default permissions and ownership of the containers within my /etc/nginx/sites-available directory. The current permissions and ownership structure appears to be off, and I'm concerned that it might not be set up correctly. Here's the listing of the directory contents:
@win11:/etc/nginx/sites-available$ ls -laX
total 40
-rwxr-xr-x 1 root root 453 May 18 11:16 beelink
-rwxr-xr-x 1 root root 453 May 18 11:16 debian
-rwxr-xr-x 1 root root 2412 May 18 11:16 default
-rwxr-xr-x 1 root root 475 May 18 11:16 github
-rwxr-xr-x 1 root root 453 May 18 11:16 htdocsh
-rwxr-xr-x 1 root root 453 May 18 11:16 htdocsl
-rwxr-xr-x 1 root root 478 May 18 11:16 portable
-rw-r--r-- 1 root root 664 Aug 6 04:17 wsldebian
drwxr-xr-x 2 root root 4096 Aug 8 02:33 .
drwxr-xr-x 8 root root 4096 May 19 04:41 ..
debian@win11:/etc/nginx/sites-available$
I wonder
- 1.) why most of the CHMOD are the same but not all. Maybe that was extracted from an archive (.7z probably) come to think of it?
- 2.) The advisory this one suggests that the owner should NOT be root, instead in this example, it should be debian:debian ? I suspect that the permissions and ownership might not be appropriately configured, and this could potentially lead to problems with my information technology systems in a business environment.
To address this issue, I would appreciate guidance on the correct permissions and ownership settings for the containers/folders within the /etc/nginx/sites-available folder. Additionally, any insights into why this issue might have occurred would be helpful. A link to the proper doc for the http server if it covers permissions.
Here's what I've tried so far: Research web sites like this one which provides useful information. Sadly I truly get lost trying to find the "correct" NGINX info. The site w/ the doc heirarchy tree on the right.
Thank you for your assistance. If you need any further information, please let me know.
What's shown is WSL, Debian on Windows 11, latest updates. I run basically the same thing on an MX-Linux 21 system. Just trying to get a better hold on correct config for NGINX. I learned some things this evening which made me realize it's pretty easy to use for fairly advanced operations.