I’m having an issue with a PHP script not being able to access the /home folder. This is only an issue from the browser, cli has no issue. The error being returned is “Failed to open directory: Permission denied” I have read that there is a systemd setting ProtectHome that if set to false should allow a user with the correct permissions to access the /home folder. There is no issues accessing other folders.
This appears to be a permissions issue as I’m not getting a “Directory no found” error. Just don’t know what else to try.
The operating system is Almalinux. Has anyone had a simplar issue? Is there another setting I should be looking at?
I have set this in both the php82-php-fpm.service and httpd.service, in addtion to trying different folder permissions and changing the user/group to apache/apache. I have also added the directory to the httpd.conf file and gave full access.
Rick Boklage is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.