Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sapi/fpm/fpm/fpm_conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,7 @@ static int fpm_conf_process_all_pools() /* {{{ */
if (wp->config->slowlog && *wp->config->slowlog) {
int fd;

fd = open(wp->config->slowlog, O_WRONLY | O_APPEND | O_CREAT, S_IRUSR | S_IWUSR);
fd = open(wp->config->slowlog, O_WRONLY | O_APPEND | O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);

if (0 > fd) {
zlog(ZLOG_SYSERROR, "Unable to create or open slowlog(%s)", wp->config->slowlog);
Expand Down
2 changes: 1 addition & 1 deletion sapi/fpm/fpm/fpm_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ int fpm_log_open(int reopen) /* {{{ */
}
ret = 0;

fd = open(wp->config->access_log, O_WRONLY | O_APPEND | O_CREAT, S_IRUSR | S_IWUSR);
fd = open(wp->config->access_log, O_WRONLY | O_APPEND | O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
if (0 > fd) {
zlog(ZLOG_SYSERROR, "failed to open access log (%s)", wp->config->access_log);
return -1;
Expand Down
5 changes: 4 additions & 1 deletion sapi/fpm/fpm/fpm_php_trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
# include <stdint.h>
#endif
#include <unistd.h>
#include <fcntl.h>
#include <sys/time.h>
#include <sys/types.h>
#include <errno.h>
Expand Down Expand Up @@ -140,10 +141,12 @@ void fpm_php_trace(struct fpm_child_s *child) /* {{{ */
TSRMLS_FETCH();
fpm_scoreboard_update(0, 0, 0, 0, 0, 0, 1, FPM_SCOREBOARD_ACTION_INC, child->wp->scoreboard);
FILE *slowlog;
int fd;

zlog(ZLOG_NOTICE, "about to trace %d", (int) child->pid);

slowlog = fopen(child->wp->config->slowlog, "a+");
fd = open(child->wp->config->slowlog, O_WRONLY | O_APPEND | O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
slowlog = fdopen(fd, "a");

if (!slowlog) {
zlog(ZLOG_SYSERROR, "unable to open slowlog (%s)", child->wp->config->slowlog);
Expand Down
2 changes: 1 addition & 1 deletion sapi/fpm/fpm/fpm_stdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ int fpm_stdio_open_error_log(int reopen) /* {{{ */
}
#endif

fd = open(fpm_global_config.error_log, O_WRONLY | O_APPEND | O_CREAT, S_IRUSR | S_IWUSR);
fd = open(fpm_global_config.error_log, O_WRONLY | O_APPEND | O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
if (0 > fd) {
zlog(ZLOG_SYSERROR, "failed to open error_log (%s)", fpm_global_config.error_log);
return -1;
Expand Down