문제

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.

도움이 되었습니까?

해결책

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).

다른 팁

You can also run:

sudo chown -R $USER:$USER /var/www/html
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top