-
-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Heads up: This fails to work as of Rocky Linux 9.2 (In FastCGI.php line 114: Access Denied) #230
Comments
How was cachetool installed? I guess to access For the |
I use the cachetool part of PHP Deployer and this downloads the phar directly for use.
Up until Rocky Linux 9.2, this did work, but no longer unless the SELinux boolean I can get around the issue by setting a specific directory using
Here's what I get with
|
Fixed in |
I can take a look next week @gordalina but I don't think that commit solves the issue of SELinux denying a script from running from |
If it doesn't solve it, I'll remove /dev/shm as a default. |
Hi @gordalina unfortunately I can't test it in 9.1.0 as the affected installations need to be PHP 8.0 for now. |
Hi, I used Rocky Linux 8.9.
Can you help me ? Thanks |
@rbocquet @gordalina I just tested this with cachetool 9.1.0 on PHP 8.1 and get:
The only way I can "fix" it is by enabling
|
I tried you're fixed but same problem
|
@rbocquet Not sure. Try making sure that the user running the command has permission on the socket file. In my case the
|
As pointed out by @jamieburchell the user running the php-fpm process needs to be able to read the file created by cachetool, if you use the same user when calling cachetool that shouldn't be an issue. Try also using a different path with |
For test, I tried
|
Do you have SELinux enabled?
|
Yes
|
It's in permissive mode, so that won't be the cause of the issue. |
Do you have any idea to solve this problem ? Thanks |
It seems like some sort of permission issue. Does the command work with |
No, I use this command as root 😞 |
Anything in PHP error logs? |
@jamieburchell It works !!! I deleted open_basedir Thanks a lot |
Instead of deleting it, you can add the path to the temp cachetool directory. |
Yes I fixed it |
After a recent upgrade from Rocky Linux 9.1 to Rocky Linux 9.2 on a SELinux enabled system, cachetool now fails with:
In FastCGI.php line 114: Error: Access denied.
I've managed to track this back to PHP now being unable to run scripts from
/dev/shm
:type=AVC msg=audit(1684332900.327:36001): avc: denied { open } for pid=279921 comm="php-fpm" path="/dev/shm/cachetool-6464e1644f7e67.25692862.php" dev="tmpfs" ino=61 scontext=system_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:user_tmp_t:s0 tclass=file permissive=0
I know that you can manually set the
--tmp-dir
, but so far this has not been necessary for me until now.Incidentally, if the tmp dir is set to
/tmp
or/var/run
cachetool fails with:In FastCGI.php line 114: Error: File not found.
The text was updated successfully, but these errors were encountered: