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

Passenger trying to create `NGX_HTTP_PROXY_TEMP_PATH` folder. #2075

Closed
CamJN opened this issue May 8, 2018 · 5 comments

Comments

Projects
None yet
3 participants
@CamJN
Copy link
Contributor

commented May 8, 2018

The module creates a folder which is not used by Passenger, even when nginx configuration overrides NGX_HTTP_PROXY_TEMP_PATH.

configuration slice:

http {
client_body_temp_path /var/nginx/client_body_temp;
proxy_temp_path /var/nginx/proxy_temp;
fastcgi_temp_path /var/nginx/fastcgi_temp;
uwsgi_temp_path /var/nginx/uwsgi_temp;
scgi_temp_path /var/nginx/scgi_temp;
}

strace log:

open("/var/run/nginx/nginx.pid", O_RDWR|O_CREAT, 0644) = 4
close(4) = 0
mkdir("/var/nginx/client_body_temp", 0700) = -1 EEXIST (File exists)
mkdir("/var/nginx/proxy_temp", 0700) = -1 EEXIST (File exists)
mkdir("/var/nginx/fastcgi_temp", 0700) = -1 EEXIST (File exists)
mkdir("/var/nginx/uwsgi_temp", 0700) = -1 EEXIST (File exists)
mkdir("/var/nginx/scgi_temp", 0700) = -1 EEXIST (File exists)
mkdir("/opt/nginx/proxy_temp", 0700) = -1 EACCES (Permission denied)
write(3, "2018/05/08 10:17:55 [emerg] 3740"..., 100) = 100
write(2, "nginx: [emerg] mkdir() \"/opt/nginx/proxy_temp\" failed (13: Permission denied)"..., 78) = 78

probably caused by src/nginx_module/Configuration.c line 64:

static ngx_path_init_t ngx_http_proxy_temp_path = {
ngx_string(NGX_HTTP_PROXY_TEMP_PATH), { 1, 2, 0 }
};
@ROMB

This comment has been minimized.

Copy link
Contributor

commented May 8, 2018

I actually submitted an easy PR #2074 to fix this.

@CamJN

This comment has been minimized.

Copy link
Contributor Author

commented May 9, 2018

Thanks for that, we'll review this as soon as we can. In the meantime could you sign the contributor agreement.

@ROMB

This comment has been minimized.

Copy link
Contributor

commented May 9, 2018

Already signed

@FooBarWidget

This comment has been minimized.

Copy link
Member

commented May 10, 2018

Thanks for submitting the pull request @ROMB. I'm wondering what other effects there are of removing that code. What will happen to the buffering behavior on the Nginx side?

@ROMB

This comment has been minimized.

Copy link
Contributor

commented May 10, 2018

I don't really know, not that much expert in nginx. If this variable and folder actually needed for buffering to work, than someone need to make that folder configurable setting, which I will not be able to do because of lack of experience.

@FooBarWidget FooBarWidget added this to the 5.3.2 milestone May 30, 2018

@CamJN CamJN removed this from the 5.3.2 milestone Jun 5, 2018

@CamJN CamJN referenced this issue Feb 13, 2019

Closed

passenger: provide dynamic nginx module #36754

5 of 5 tasks complete

@CamJN CamJN closed this Feb 15, 2019

@CamJN CamJN removed the SupportCentral label Feb 23, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.