Req #69509 [Com]: fpm slowlog file permissions feature
Edit report at https://bugs.php.net/bug.php?id=69509&edit=1
ID: 69509
Comment by: mgarrido at archipelia dot com
Reported by: chenmingjie0828 at 163 dot com
Summary: fpm slowlog file permissions feature
Status: Open
Type: Feature/Change Request
Package: FPM related
Operating System: Centos6
PHP Version: 5.6.8
Block user comment: N
Private report: N
New Comment:
This feature is very helpful.
I want to push php-fpm logs to my logstash.
But, my logstash daemon isn't root.
So, he can't read php-fpm logs.
With can't chmod manually because logrotate reset rights after his execution.
Previous Comments:
------------------------------------------------------------------------
[2015-04-23 06:29:28] chenmingjie0828 at 163 dot com
Description:
------------
php-fpm generate log files with a default permission 0600,which makes other user or group unable to
read the slow log or access log. So I make a patch to fixed this problem , which allows users to
configure the file permission as they wanted. The entry in fpm configuration is file_mode directive.
fpm configruation:
slowlog = log/$pool.log.slow
request_slowlog_timeout = 5
request_terminate_timeout = 10
New feature:
file_mode = 0644 //or other file permission u want.
Test script:
---------------
<?php
sleep(10)ï¼
echo "hello world";
?>
Expected result:
----------------
I expect fpm generate a slow log with file permission that other people are able to read.
Actual result:
--------------
ls -la www-slow_log
-rw------- 1 root root 0 Apr 23 02:03 www.log.slow
Actuallyï¼ It generate a slow log with file permission 0666(-rw- --- ---),which makes other
people unable to read. It's quite inconvenient, since I want some other development people to
read it.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=69509&edit=1
Thread (4 messages)