FS#38817 - [php] Content of /tmp is not visible from FPM when using systemd tmpfs

Attached to Project: Arch Linux
Opened by Daniel Milde (dundee) - Thursday, 06 February 2014, 16:07 GMT
Last edited by Gerardo Exequiel Pozzi (djgera) - Thursday, 06 February 2014, 20:02 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Directory /tmp is not accessible from PHP running as PHP-FPM when /tmp is mounted using systemd.


Additional info:
* PHP 5.5.9
* systemd 208-10


Steps to reproduce:
<?php
print_r(shell_exec('ls /tmp'));
?>

Should return content of /tmp directory. Returns nothing.
This task depends upon

Closed by  Gerardo Exequiel Pozzi (djgera)
Thursday, 06 February 2014, 20:02 GMT
Reason for closing:  Not a bug
Additional comments about closing:  See comments.
Comment by Jan de Groot (JGC) - Thursday, 06 February 2014, 18:29 GMT
This is not a bug, but a feature:

/usr/lib/systemd/system/php-fpm.service:
PrivateTmp=true

If you don't want it, feel free to copy the file to /etc/systemd/system/php-fpm.service and change it there.
Comment by Dave Reisner (falconindy) - Thursday, 06 February 2014, 18:37 GMT
Or just create ''/etc/systemd/system/php-fpm.service.d/private-tmp.conf'' with contents:

[Service]
PrivateTmp=false

Loading...