PHP-FPM and Folder Permission Issue
by rickabca from LinuxQuestions.org on (#6NVVG)
I have created two Logical Volumes with mounts /home and /alldata. I'm having an issue with a PHP script not being able to read these folders, error is "Failed to open directory: Permission denied in". So the web process can see the folder just not open. This is only an issue from the browser, cli has no issue.
Here some additional information.
Here some additional information.
- OS is AlmaLinux 9.4
- web server (apache) user is apache/apache
- php-fpm.d/www.conf user is apache/apache
- logical drive is mounted as /home and /alldata
- /home owner is root/root 0755
- /home/data owner is apache/apache 0755 (folder trying to read)
- /alldata owner is apache/apache 0755 (folder trying to read)
- I tried 0777 on all the folders as well. Same issues
- I have also tried setting the user to apache/apache starting at the /home folder
- the web process can access any folder off of the Logical Volume mounted as /root
- the php script run from command line can open/access /home and /alldata