Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

directory index of "/usr/share/nginx/html/" is forbidden when mounting a file into nginx container #2691

Open
ChrisJBurns opened this issue May 15, 2024 · 2 comments
Labels
needs-triage applied to all new customer/user issues. Removed after triage occurs.

Comments

@ChrisJBurns
Copy link

ChrisJBurns commented May 15, 2024

Which image/versions are related to this issue/feature request?

Image: nginx:1.25

Issue/Feature description

Whilst we wait for #435 we are instead attempting to mount a configmap as a file called config.js into the nginx container under directory /usr/share/nginx/html/ which the HTML code then uses. However we get the directory index of "/usr/share/nginx/html/" is forbidden error, I've tried using fsGroup: 65532 and all other combinations but cannot seem to get it to work.

Interestingly when we try this locally using the same image, we don't get problems when using docker volumes like so:
docker run -v $(pwd)/config.js:/usr/share/nginx/html/config.js -p 8080:8080 test-nginx-service.

I can provide code snippets if needed, I just thought I'd raise the above incase there was an easy answer that someone may be aware of

@ChrisJBurns ChrisJBurns added the needs-triage applied to all new customer/user issues. Removed after triage occurs. label May 15, 2024
@gecube
Copy link

gecube commented Jun 8, 2024

Hi!

No idea, it should be working on vanilla cluster. Could you kindly share all the manifests for reproducing the issue? I will try on vanilla k8s...

@ChrisJBurns
Copy link
Author

Our manifests are a bit ... sensitive unfortunately, I will however try on k3s and see how I get on. We are using EKS and have done a lot of stuff around policy engines so there may be an issue downstream from that. I shall update this issue when I have given it a test. Thanks @gecube

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage applied to all new customer/user issues. Removed after triage occurs.
Projects
None yet
Development

No branches or pull requests

2 participants