Friday, October 7, 2022

[SOLVED] Permission denied on include()

Issue

I'm trying to include a PHP file found in /home/user/Framework/Core/file.php.

I have my apache to run virtual host from the DNS to /srv/www/.

Then, /srv/www/index.php tries to include /home/user/Framework/Core/file.php and I get a permision denied.

I changed permission for /home/ recursive to 744 so it can read it, I also did chown -R apache /home/

how can I solve this?


Solution

You need to set your permissions for folders to 755, so that PHP has the authorization to execute the opening of them. Additionally, you should set all actual files to 644, as execute permission is only needed for folders.



Answered By - PlantTheIdea
Answer Checked By - Senaida (WPSolving Volunteer)