Welcome! Log In Create A New Profile

Advanced

Re: client_body_temp_path - permissions

Konstantin Baryshnikov
June 01, 2017 10:48PM
>
> On May 31, 2017, at 12:35 AM, S.A.N <nginx-forum@forum.nginx.org> wrote:
>
> Я конечно извиняюсь, за настойчивость, но неужели пермишен 0600, на файл
> который должен быть обработан в другом процессе, это нормально и это никак
> нельзя настроить в конфиге Nginx?

Нельзя.

Я по большой нужде обходился вот таким патчем:

diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -386,6 +386,13 @@
offsetof(ngx_http_core_loc_conf_t, client_body_in_single_buffer),
NULL },

+ { ngx_string("client_body_file_group_access"),
+ NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG,
+ ngx_conf_set_flag_slot,
+ NGX_HTTP_LOC_CONF_OFFSET,
+ offsetof(ngx_http_core_loc_conf_t, client_body_file_group_access),
+ NULL },
+
{ ngx_string("sendfile"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
|NGX_CONF_FLAG,
@@ -1462,6 +1469,7 @@
}

r->request_body_in_single_buf = clcf->client_body_in_single_buffer;
+ r->request_body_file_group_access = clcf->client_body_file_group_access;

if (r->keepalive) {
if (clcf->keepalive_timeout == 0) {
@@ -3571,6 +3579,7 @@
clcf->max_ranges = NGX_CONF_UNSET_UINT;
clcf->client_body_in_file_only = NGX_CONF_UNSET_UINT;
clcf->client_body_in_single_buffer = NGX_CONF_UNSET;
+ clcf->client_body_file_group_access = NGX_CONF_UNSET;
clcf->internal = NGX_CONF_UNSET;
clcf->sendfile = NGX_CONF_UNSET;
clcf->sendfile_max_chunk = NGX_CONF_UNSET_SIZE;
@@ -3792,6 +3801,8 @@
NGX_HTTP_REQUEST_BODY_FILE_OFF);
ngx_conf_merge_value(conf->client_body_in_single_buffer,
prev->client_body_in_single_buffer, 0);
+ ngx_conf_merge_value(conf->client_body_file_group_access,
+ prev->client_body_file_group_access, 0);
ngx_conf_merge_value(conf->internal, prev->internal, 0);
ngx_conf_merge_value(conf->sendfile, prev->sendfile, 0);
ngx_conf_merge_size_value(conf->sendfile_max_chunk,
diff --git a/src/http/ngx_http_core_module.h b/src/http/ngx_http_core_module.h
--- a/src/http/ngx_http_core_module.h
+++ b/src/http/ngx_http_core_module.h
@@ -402,6 +402,7 @@
ngx_uint_t server_tokens; /* server_tokens */
ngx_flag_t chunked_transfer_encoding; /* chunked_transfer_encoding */
ngx_flag_t etag; /* etag */
+ ngx_flag_t client_body_file_group_access; /* client_body_file_group_access */

#if (NGX_HTTP_GZIP)
ngx_flag_t gzip_vary; /* gzip_vary */

>
> Posted at Nginx Forum: https://forum.nginx.org/read.php?21,274059,274538#msg-274538

_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

client_body_temp_path - permissions

S.A.N May 03, 2017 09:26AM

Re: client_body_temp_path - permissions

S.A.N May 30, 2017 05:35PM

Re: client_body_temp_path - permissions

Konstantin Baryshnikov June 01, 2017 10:48PM

Re: client_body_temp_path - permissions

S.A.N June 02, 2017 06:04AM

Re: client_body_temp_path - permissions

Pavel V. June 02, 2017 08:24AM

Re: client_body_temp_path - permissions

S.A.N June 02, 2017 10:49AM

Re: client_body_temp_path - permissions

S.A.N June 02, 2017 11:02AM

Re: client_body_temp_path - permissions

Pavel V. June 02, 2017 11:54AM

Re: client_body_temp_path - permissions

S.A.N June 02, 2017 12:26PM

Re: client_body_temp_path - permissions

Konstantin Baryshnikov June 02, 2017 08:34PM

Re: client_body_temp_path - permissions

S.A.N June 03, 2017 06:51AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 244
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready