Folder permission /var/www/html

Asked

Viewed 10,517 times

3

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 signed as root and ran the chmod 777. but continues to give 'permission denied'

  • Who gives "denied permission"? At the time of creating the file or at the time of running?

  • When recording the file.

  • The answer I gave was thinking you were in the development environment. Don’t do this in production. I even asked a question for us to better answer these questions. What are the risks of using permission 777?

1 answer

3


Whenever I have a file reading problem, I use the command sudo chmod with the option -R.

Behold:

cd /var/www/html
sudo chmod -R 777 .

In that case, you’re telling him to do it recursively (the option -R), picking up the whole directory.

Remembering that I am guessing you are applying such an operation on your own machine. On servers whose environment is in production do not recommend giving full permission to a folder.

  • 1

    It worked!! Thank you very much!!

  • 1

    It’s in the local environment. Thank you!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.