Dear all,
I am a beginner of docker. I built a nginx container and map volume \Volume1\www:\usr\share\nginx\html.
I follows instruction from internet to setup permission of host folder and file. But index.html is still access fail.
Can everyone to help me.
container log and folder file permission as below
2026/06/30 03:32:15 [error] 22#22: *1 open() "/usr/share/nginx/html/index.html" failed (13: Permission denied), client: 192.168.1.4, server: localhost, request: "GET /index.html HTTP/1.1", host: "192.168.1.3:40243"
192.168.1.4 - - [30/Jun/2026:03:32:15 +0000] "GET /index.html HTTP/1.1" 403 555 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36 Edg/149.0.0.0" "-"
2
drwxr-xr-x+ 1 usera usera 66 Jun 30 11:45 www
-rwxr-xr-x+ 1 usera usera 154 Jun 30 09:18 index.html
[Help] How to grant file permission to nginx container
- richardtanghw
- Posts: 2
- Joined: 02 Nov 2024, 22:02

Re: [Help] How to grant file permission to nginx container
The “Permission denied” error typically stems from user permissions within the container rather than the file itself; checking the UID/GID or correctly applying `chown` or `chmod` is the key to resolving the issue.
