I've just installed Ubuntu for the first time, and trying to set parameters for web server. As I've understand I have to place my website inside /var/www/html folder, but I can't even create a file in there. What's the catch? How do I get root permissions?
Asked
Active
Viewed 373 times
3 Answers
1
The accepted answer is not a proper way to do this.
You should read: Whats the simplest way to edit and add files to "/var/www"? and follow the suggestions there.
Duncubuntu
- 11
0
If you want to do this in Terminal or SSH, instead of using your graphical interface, you just need prefix your commands with sudo. Eg:
New folder:
sudo mkdir testsite
Edit a file:
sudo nano index.html
Also, a quick and dirty way of always giving yourself access:
sudo chown -R username /var/www/html