mirror of
https://github.com/nginx/nginx.git
synced 2026-08-04 14:58:20 +00:00
Core: Don't create temp directories when tesing configurations.
If no user directive is set in nginx.conf and Nginx is started by a non-root account (e.g., `nginx`), the temporary directories is created with owner `nginx`. Later, when root runs `nginx -t`, it changes the owner of that temp directories to `nobody`, causing the running worker processes to lose permission to read the temp directories.
This commit is contained in:
parent
0609736a92
commit
c3e44c8c12
1 changed files with 4 additions and 2 deletions
|
|
@ -351,8 +351,10 @@ ngx_init_cycle(ngx_cycle_t *old_cycle)
|
|||
}
|
||||
|
||||
|
||||
if (ngx_create_paths(cycle, ccf->user) != NGX_OK) {
|
||||
goto failed;
|
||||
if (!ngx_test_config) {
|
||||
if (ngx_create_paths(cycle, ccf->user) != NGX_OK) {
|
||||
goto failed;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue