Bug #73466 [NEW]: systemd option PrivateTmp= having no effect for a pool that is chrooted.

From: Date: Sat, 05 Nov 2016 17:22:12 +0000
Subject: Bug #73466 [NEW]: systemd option PrivateTmp= having no effect for a pool that is chrooted.
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-205198@lists.php.net to get a copy of this message
From:             psaod8fza9s at gmail dot com
Operating system: Debian 8.6
PHP version:      5.6.27
Package:          FPM related
Bug Type:         Bug
Bug description:systemd option PrivateTmp= having no effect for a pool that is chrooted.

Description:
------------
So I created a new pool and chrooted it to /var/www/site1.

# /etc/php5/fpm/pool.d/site1.conf
# ...
chroot = /var/www/site1
chdir = /
# ...


I bind-mounted /tmp to /var/www/site1/tmp.

I changed the systemd service configuration file php5-fpm.service and
added "PrivateTmp=true" under "[Service]".

When I start the php5-fpm service I can see that PrivateTmp took effect
because there is a folder named
/tmp/systemd-private-*-php5-fpm.service-*/

But a scandir("/tmp") lists the content of /tmp, thus PrivateTmp having
no effect when chroot= is active.

But when I change the php pool config file and remove the "chroot="
configuration, a scandir("/tmp") lists the content of
/tmp/systemd-private-*-php5-fpm.service-*/



-- 
Edit bug report at https://bugs.php.net/bug.php?id=73466&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=73466&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=73466&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=73466&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=73466&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=73466&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=73466&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=73466&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=73466&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=73466&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=73466&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=73466&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=73466&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=73466&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=73466&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=73466&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=73466&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=73466&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=73466&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=73466&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=73466&r=mysqlcfg



Thread (1 message)

  • psaod8fza9s at gmail dot com
« previous php.bugs (#205198) next »