ngx_open_file(name, access, create) > ngx_open_file(name, mode, create, access)
diff --git a/src/core/ngx_conf_file.c b/src/core/ngx_conf_file.c
index baa43c9..9e4b30a 100644
--- a/src/core/ngx_conf_file.c
+++ b/src/core/ngx_conf_file.c
@@ -76,7 +76,7 @@
/* open configuration file */
- fd = ngx_open_file(filename->data, NGX_FILE_RDONLY, NGX_FILE_OPEN);
+ fd = ngx_open_file(filename->data, NGX_FILE_RDONLY, NGX_FILE_OPEN, 0);
if (fd == NGX_INVALID_FILE) {
ngx_conf_log_error(NGX_LOG_EMERG, cf, ngx_errno,
ngx_open_file_n " \"%s\" failed",
diff --git a/src/core/ngx_cycle.c b/src/core/ngx_cycle.c
index 89109b3..7daebaa 100644
--- a/src/core/ngx_cycle.c
+++ b/src/core/ngx_cycle.c
@@ -312,7 +312,8 @@
}
file[i].fd = ngx_open_file(file[i].name.data, NGX_FILE_RDWR,
- NGX_FILE_CREATE_OR_OPEN|NGX_FILE_APPEND);
+ NGX_FILE_CREATE_OR_OPEN|NGX_FILE_APPEND,
+ NGX_FILE_DEFAULT_ACCESS);
ngx_log_debug3(NGX_LOG_DEBUG_CORE, log, 0,
"log: %p %d \"%s\"",
@@ -849,7 +850,8 @@
trunc = ngx_test_config ? 0 : NGX_FILE_TRUNCATE;
file.fd = ngx_open_file(file.name.data, NGX_FILE_RDWR,
- NGX_FILE_CREATE_OR_OPEN|trunc);
+ NGX_FILE_CREATE_OR_OPEN|trunc,
+ NGX_FILE_DEFAULT_ACCESS);
if (file.fd == NGX_INVALID_FILE) {
ngx_log_error(NGX_LOG_EMERG, log, ngx_errno,
@@ -959,7 +961,8 @@
}
fd = ngx_open_file(file[i].name.data, NGX_FILE_RDWR,
- NGX_FILE_CREATE_OR_OPEN|NGX_FILE_APPEND);
+ NGX_FILE_CREATE_OR_OPEN|NGX_FILE_APPEND,
+ NGX_FILE_DEFAULT_ACCESS);
ngx_log_debug3(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
"reopen file \"%s\", old:%d new:%d",
diff --git a/src/core/ngx_log.c b/src/core/ngx_log.c
index 280ead0..73a305f 100644
--- a/src/core/ngx_log.c
+++ b/src/core/ngx_log.c
@@ -209,7 +209,7 @@
ngx_stderr_fileno = GetStdHandle(STD_ERROR_HANDLE);
ngx_stderr.fd = ngx_open_file(NGX_ERROR_LOG_PATH, NGX_FILE_RDWR,
- NGX_FILE_CREATE_OR_OPEN|NGX_FILE_APPEND);
+ NGX_FILE_CREATE_OR_OPEN|NGX_FILE_APPEND, 0);
if (ngx_stderr.fd == NGX_INVALID_FILE) {
ngx_message_box("nginx", MB_OK, ngx_errno,