-
Notifications
You must be signed in to change notification settings - Fork 760
nginx: [emerg] mkdir() "/var/tmp/nginx/client_body" failed (13: Permission denied) #16
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
Comments
Hi Brennan, If I use the latest image, POST a file that's bigger than 16K (and smaller than 1MB) to the example page it shows this in the log:
But the request is successful. That's expected behavior. Can you paste the result of this command; |
My older version running PHP 7.1.9(Oct 2017)
With the 1.2.0 tag:
This is enough to reproduce the error message(no error on prior version):
If that doesn't reproduce it for you, it might actually be the kernel version as pointed out. My server is running the LTS 4.4.104 kernel on openSUSE Leap 42.2. The linked issue stated they resolved it with kernel 4.13 upgrade, not sure if that's the min required if this issue is due to kernel somehow, The latest openSUSE 15.1 only provides the 4.12 kernel however. |
Thanks for the input, that really helps! I indeed can't reproduce it with;
It just works. I'm on kernel I hope you're able to update to a newer kernel to see if that solves it. Otherwise they mention a workaround by moving all the temp folders nginx needs to |
The server is running production stuff and I'm not too confident with doing an upgrade to a new major fixed release atm, it's volunteer work for a community. What I can do is try it out locally by installing an older kernel on my distro to see if it really is the kernel. I'll let you know how that goes once I get around to it.
Yeah, this might work. To keep it flexible perhaps keep those paths in a separate conf file and include it from the server conf file? That would be useful with the other issue I raised on this project here. If you like, when I do the local kernel test, I can try this out and if it works for both issues well, then submit a PR of the modularized config? |
I placed a comment on #17 explaining my view on it. You're always welcome to submit a PR of course! |
I'll close this issue. If you have any updates on the kernel tests, let me know! |
@TrafeX Hey there, sorry for disappearing! I got around to testing with a 4.4 kernel on my local system and the error does occur there. So definitely seems like an issue with the older kernel that was fixed in newer ones. To fix it requires setting all these paths to use
I'll continue with how to progress with a PR via #17 . |
Hi @polarathene, Thanks for coming back to this, as mentioned in #17 (comment) I've changed the temp paths to |
Just updated this image which was installed some time ago(2017-2018?), there seems to be an issue with nginx failing to run because it cannot create the
client_body
dir,/var/tmp/nginx
does exist as an empty dir though.I came across this issue which seems to be the same problem encountered in 2018. The linked issue comment points out that it's likely due to the kernel. The server is running 4.4 kernel(which has been updated earlier this year).
A comment later on in the issue then suggests pointing nginx tmp paths to a different location instead. Though I'm not sure where a list of all those are. It appears there is only the 5(all grouped together on that page, see
--http-client-body-temp-path=path
).I also came across this response on the nginx forums which state it could be due to permissions issue from a parent directory.
/var/tmp/nginx
isnobody:nobody
but parent/var/tmp
isroot:root
, perhaps that's somehow the cause? I see that the switch to anobody
user/group was about 7 months ago.The text was updated successfully, but these errors were encountered: