Bug #78963 [Com]: php-fpm-7.4.0 can't access devices
| From: | jeanmarc dot louviaux at gmail dot com | Date: | Mon, 16 Dec 2019 08:50:17 +0000 |
| Subject: | Bug #78963 [Com]: php-fpm-7.4.0 can't access devices | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-224323@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=78963&edit=1
ID: 78963
Comment by: jeanmarc dot louviaux at gmail dot com
Reported by: jeanmarc dot louviaux at gmail dot com
Summary: php-fpm-7.4.0 can't access devices
Status: Open
Type: Bug
Package: FPM related
Operating System: Arch
PHP Version: 7.4.0
Block user comment: N
Private report: N
New Comment:
Hi,
thanks for pointing me this but i can't still get it working.
I have tried changing php-fpm.service but adding :
#Access /dev
PrivateDevices=no
DevicePolicy=auto
#DeviceAllow=true
Obviously did systemctl daemon-reload and systemctl restart php-fpm
But can't access to any /dev
Could you please help me with that ?
Cheers
Previous Comments:
------------------------------------------------------------------------
[2019-12-15 16:32:42] bugreports at gmail dot com
learn about systemd-dropins and set PrivateDevices=no
this change of defaults is completly deserved
https://docs.flatcar-linux.org/os/using-systemd-drop-in-units/
------------------------------------------------------------------------
[2019-12-15 13:37:13] jeanmarc dot louviaux at gmail dot com
Description:
------------
Hello,
I'am using app via php-fpm that communicate with some of my USB ports (Arduino, electric meters
and a solar inverter)
It was running for years without any hitchs. I just had to usermod -a -G uucp http.
Since php-fpm-7.4.0 i'am unable to access them, so i had to downgrade. Could you please fix
that ?
Cheers
Test script:
---------------
<?php
$com = "aurora -a 2 -c -T -Y3 -l4 -d0 -e /dev/ttyUSB1";
//$com = "ls -al /dev/";
//$com = "poolmeters ws";
exec("$com 2>&1", $datareturn);
$datareturn = trim(implode($datareturn));
echo $datareturn;
?>
Expected result:
----------------
Get returns from my devices ;)
Actual result:
--------------
Unable to open any dev/port
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=78963&edit=1