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

mkdir() "/usr/local/openresty/nginx/client_body_temp" failed (13: Permission denied) #120

Closed
dove-young opened this issue Sep 19, 2019 · 2 comments

Comments

@dove-young
Copy link

Docker image openresty/openresty:alpine cannot start up while deploy into Kubernetes with runAsNonRoot: true security context

Image ID is "sha256:98649cc07221ad5e30cdc72f717b11754bd128d54152f002c81605eabe4652e0"

Error message said as this

kubectl logs openresty-55f8d78fdb-wm75s
chmod: /usr/local/openresty/nginx: Operation not permitted
2019/09/19 07:59:07 [emerg] 7#7: mkdir() "/usr/local/openresty/nginx/client_body_temp" failed (13: Permission denie
d)
nginx: [emerg] mkdir() "/usr/local/openresty/nginx/client_body_temp" failed (13: Permission denied)

It actually need to create many directories under /usr/local/openresty/nginx during start up

  • uwsgi_temp
  • scgi_temp
  • proxy_temp
  • fastcgi_temp
  • client_body_temp

And it also failed to create error.log file under /usr/local/openresty/nginx/logs while deploy into Kubernetes with runAsNonRoot: true security context

The only way I can get it up and running is to configure clusterrolebinding to allow openresty/openresty:alpine to run as root. This is an un-acceptable security context in a production environment.

@neomantra
Copy link
Member

This is a dupe of #119. Can you check out the solution there and see if it meets your needs?

I'll be resolving that within the next week.

@dove-young
Copy link
Author

solution on #119 works for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants