Pregunta

I installed Apache in Ubuntu and it made folder /var/www.

Inside this folder I intend to create a php file, so that I can check if it is working or not, but I dont have permission to make new documents in there.

I tried chmod 777 /var/www but it says chmod: changing permissions of ‘/var/www’: Operation not permitted

How do I do this? Shall I be root and then do it? How to go about that. I don't know If I ever set my root password during installation of Ubuntu or not, because I dont really remember it right now.

¿Fue útil?

Solución

sudo

sudo chmod 777 /your location

When it prompts you for your password, type in the password of the account you logged in as.

do a "man sudo" for more info, but basically it elevates your permissions to root (if you use no other arguments).

Otros consejos

You can also run:

sudo chown -R $USER:$USER /var/www/html
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top