0

I work in Ubuntu 14.04. Well, I always had the misconception that installing a software from the root user makes the software available to all users. So, I wanted to install apache and add my html pages over there. I installed apache using root user. It installed successfully.

Then to test apache, I typed localhost, and the default page came up successfully. So then I thought about changing the index.html page and adding my code. I was making all my .html files in gedit, and thus tried to change index.html in gedit. When I tried to open it, it told me I could open it in only read-only mode, and I could not change it. Then I figured out that I could not change the permissions, nor change the file in the normal user.

I thought about it for a while, and thought removing the index.html file and adding my on file would work. But it didn't.

Then I uninstalled apache and re-installed it from normal user. Still I couldn't change the index.html in normal user.

So is there a way, to access and change the index.html file of apache installed in root in normal user?

NOTE: I know the password of root, and can even uninstall apache and install it again. This is on my personal computer.

1 Answers1

0

Do

ls -l in the directory where index.html

is residing

Find out the file permissions for that.

You could very well done this

sudo gedit index.html

make the change and it will work

You need to make use of the command

chown ashish:ashish or
chown ashish:root

to change the onwership of the files in that directory

Ashu
  • 3,966