Access denied creating Apache website in /var/www
by SamHobbs from LinuxQuestions.org on (#5SPHG)
I have Ubuntu 20.04.3 in a portable drive. I installed Apache using Install and Configure Apache | Ubuntu. I was able to rename the index.html in /var/www/html and create my own index.html and it is rendered when I browse to localhost.
Then on page three it explains how to create a separate website. The instructions use gci as in /var/www/gci/ but it says we can use any name so I am using whatever. When I try to save an index.html into /var/www/whatever/ I get access denied, I am not the owner (I forget the actual words). The permissions for /var/www/whatever/ appear to me to be the same as for /var/www/html/ but I probably do not know where to look.
The critical commands that the instructions say to use are:
sudo mkdir /var/www/whatever/
cd /var/www/whatever/
nano index.html
Is that enough information for you to suggest something to diagnose the problem?
Then on page three it explains how to create a separate website. The instructions use gci as in /var/www/gci/ but it says we can use any name so I am using whatever. When I try to save an index.html into /var/www/whatever/ I get access denied, I am not the owner (I forget the actual words). The permissions for /var/www/whatever/ appear to me to be the same as for /var/www/html/ but I probably do not know where to look.
The critical commands that the instructions say to use are:
sudo mkdir /var/www/whatever/
cd /var/www/whatever/
nano index.html
Is that enough information for you to suggest something to diagnose the problem?