0

I have searched and searched and can't find anything specific to my problem.

I am a Mac user, new to Ubuntu. I wiped my HP notebook and installed 32-bit (no choice) Ubuntu. Then I installed the LAMP server followed by phpMyAdmin. My html folder was installed inside of root (/). A shortcut to phpMyAdmin is inside of that. Every time I try to do anything with web files, I get permission denied. I created a file with Sublime Text, later double-clicked on it and when it opened in Gedit, I couldn't save changes because permission was denied.

I can understand needing permission to write to the root folder. Why, then, is my www folder, something I would write to often, installed there? It's useless to me there if I have to jump through hoops to do anything. As a shot in the dark, am I supposed to create a www folder in my Home folder and map it to /var/www/html or vice versa? If so, how do I do that?

1

1 Answer 1

0

Well, regular users don't get permission to do many things to the file system outside their home directory. I think it's just to make sure that no one accidentally deletes something really important.

Anyways, about mapping, you can try this: create a folder with any name inside your home directory, open the terminal and use sudo to make a symbolic link in /var/www with the name html which would point to the folder in your home.

So for example, in your home, you can create a folder named webdev. Then open the terminal, and do the following:

cd /var/www
sudo mv html xyz
sudo ln -s ~/webdev html

And that should do it. Now you can manipulate files in the webdev folder inside your home.

Do make sure that the webdev folder in your home directory has proper permission to let other users at least access the contents. You can do this easily by right clicking on the webdev folder icon and going to Properties --> Permissions.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .