I installed Apache, Mysql and PHP. But when I try to create phpinfo to test PHP in the folder, it gives permission denied.
I already logged in as root and executed chmod 777
. but continues to give 'denied permission'
I installed Apache, Mysql and PHP. But when I try to create phpinfo to test PHP in the folder, it gives permission denied.
I already logged in as root and executed chmod 777
. but continues to give 'denied permission'
Whenever I have a file reading problem, I use the sudo chmod
command with the -R
option.
See:
cd /var/www/html
sudo chmod -R 777 .
In this case, you are telling him to do this recursively (the -R
option), picking up the entire directory.
Remembering that I'm assuming you're applying such an operation on your own machine. On servers whose environment is in production I do not recommend giving full permission to a folder.