Req #69509 [NEW]: fpm slowlog file permissions feature
| From: | chenmingjie0828 at 163 dot com | Date: | Thu, 23 Apr 2015 06:29:28 +0000 |
| Subject: | Req #69509 [NEW]: fpm slowlog file permissions feature | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-192285@lists.php.net to get a copy of this message | ||
From: chenmingjie0828 at 163 dot com
Operating system: Centos6
PHP version: 5.6.8
Package: FPM related
Bug Type: Feature/Change Request
Bug description:fpm slowlog file permissions feature
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 bug report at https://bugs.php.net/bug.php?id=69509&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=69509&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=69509&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=69509&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=69509&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=69509&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=69509&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=69509&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=69509&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=69509&r=support
Expected behavior: https://bugs.php.net/fix.php?id=69509&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=69509&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=69509&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=69509&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=69509&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=69509&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=69509&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=69509&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=69509&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=69509&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=69509&r=mysqlcfg