summaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/ngx_conf_file.c2
-rw-r--r--src/core/ngx_cycle.c9
-rw-r--r--src/core/ngx_log.c2
3 files changed, 8 insertions, 5 deletions
diff --git a/src/core/ngx_conf_file.c b/src/core/ngx_conf_file.c
index baa43c912..9e4b30a08 100644
--- a/src/core/ngx_conf_file.c
+++ b/src/core/ngx_conf_file.c
@@ -76,7 +76,7 @@ ngx_conf_parse(ngx_conf_t *cf, ngx_str_t *filename)
/* 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 89109b389..7daebaac3 100644
--- a/src/core/ngx_cycle.c
+++ b/src/core/ngx_cycle.c
@@ -312,7 +312,8 @@ ngx_init_cycle(ngx_cycle_t *old_cycle)
}
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 @@ ngx_create_pidfile(ngx_str_t *name, ngx_log_t *log)
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 @@ ngx_reopen_files(ngx_cycle_t *cycle, ngx_uid_t user)
}
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 280ead0db..73a305f59 100644
--- a/src/core/ngx_log.c
+++ b/src/core/ngx_log.c
@@ -209,7 +209,7 @@ ngx_log_init(void)
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,