client_body_temp_path got removed unexpectedly
February 05, 2018 02:54PM
Hello:
I have my inbound_nginx conf that sets

client_body_temp_path /tmp/inbound_nginx;
proxy_temp_path /tmp/inbound_nginx;

It ran ok some time and we had some security scanners running against it and after a week, I found errors in error.log that /tmp/inbound_nginx/<tempfile> is not found.

eg:

2018/01/23 12:07:58 [crit] 3714#0: *1062 open() "/tmp/inbound_nginx/0000000001" failed (2: No such file or directory) while reading upstream, client: <IP>, server:...

I then check and find out /tmp/inbound_nginx was removed at some point unexpectedly. I check ubuntu system cron jobs and do not find any cron that will clean up /tmp. I notice /tmp/inbound_nginx is created with 700 for nginx user www-data in our case.

I greatly appreciate your explanation and how to protect this path from being removed accidentally. Is it /var/tmp is a better path? Will proxy_buffering off; would help as we do not use load balance or proxied servers, just a single upstream nginx.

Thanks,
av
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 80
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready