Opened 6 years ago

#1651 new enhancement

client_body_in_file_only/client_body_temp_path file permissions

Reported by: mrarm.slack@… Owned by:
Priority: minor Milestone:
Component: nginx-core Version: 1.15.x
Keywords: Cc:
uname -a:
nginx -V: nginx version: nginx/1.14.0
built with OpenSSL 1.1.0h 27 Mar 2018 (running with OpenSSL 1.1.1 11 Sep 2018)
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --conf-path=/etc/nginx/nginx.conf --sbin-path=/usr/bin/nginx --pid-path=/run/nginx.pid --lock-path=/run/lock/nginx.lock --user=http --group=http --http-log-path=/var/log/nginx/access.log --error-log-path=stderr --http-client-body-temp-path=/var/lib/nginx/client-body --http-proxy-temp-path=/var/lib/nginx/proxy --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-cc-opt='-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2' --with-ld-opt=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now --with-compat --with-debug --with-file-aio --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_degradation_module --with-http_flv_module --with-http_geoip_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-pcre-jit --with-stream --with-stream_geoip_module --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-threads

Description

Hello,
I have a setup where I have the Nginx server and application server running on different user accounts. I want to be able to use client_body_in_file_only/client_body_temp_path in order to save the file to disk and forward the $request_body_file to the application. However the file permissions are always 0600 making the application unable to read the file at all.
Looking in the Nginx source code - this is currently an unsupported scenario: https://github.com/nginx/nginx/blob/1305b8414d22610b0820f6df5841418bf98fc370/src/http/ngx_http_request_body.c#L468 creates the temporary file with the default permissions which get later expanded to 0600 (unless request_body_file_group_access is set - but unfortunately that property is not settable).

Change History (0)

Note: See TracTickets for help on using tickets.