# Solved: Ubuntu: Permission denied



## sepala

Hi,

I am practicing linux shell in these days. I have an excercise to do, and that need to create a folder inside "home" directory. I tried to create that using the shell but I got a message "permission denied". Then I trying to create that using GUI, but that "create folder" in the right click menu is deactivated. So I tried to change the access permission using "chmod" in the shell but it game me an error "operation not permitted". I am using linux 10.10 and I am running that inside the VirtualBox software. Please help.


----------



## leroys1000

You can't make changes to root folders from a normal user account.
To run commands in the terminal with elevated priviledges use sudo
before your command.
Something like:
sudo chmod filename xxx
Whatever command you are running,use sudo before it.
It will ask for your password.
You can also run programs with elevated priviledges.
Say,if you wanted to run the file editor,use the command
sudo gedit


----------



## prunejuice

Don't go chmod'ing anything...

If you're not familiar with ownership, you're going to do something you regret later.

just:

*gksudo nautilus*

...create your folder in your home directory and be done.


----------



## sepala

Thanks for the replies. I will try that sudo thing. But I am the owner of this system. So what I am doing wrong? In my university, we created folders in "home" with no matter!(Anyway we have fedora there) How to gain the privileges forever? I am the owner and I am the only user and I have installed linux inside the virtualbox.


----------



## sepala

Thanks for the replies. I will try that sudo thing. But I am the owner of this system. So what I am doing wrong? In my university, we created folders in "home" with no matter!(Anyway we have fedora there) How to gain the privileges forever? I am the owner and I am the only user and I have installed linux inside the virtualbox.


----------



## sepala

Thanks a lot fr both of you! I used "sudo mkdir knight" and it worked pretty fine! Please give me an answer to my second question in the above post.


----------



## sepala

And my third question is "what is the use of sudo? for what it stands for?"


----------



## TerryNet

Maybe Fedora works differently. My attachment is VirtualBox guest Ubuntu 11.04 (but no difference from 10.10 in this regard). You can see from the first 'ls' that what is normally termed my "Home" directory (/home/terry) is owned by me, but the second 'ls' shows that the actual /home directory is owned by root. This is just the way Ubuntu (and, I think, most Linux distributions) work.

Super User DO (sudo) means to do a command as the Super User (root). Not quite the same as root since your (administrative) password is sufficient, but it still gives good protection as it prevents malware and restricted users from making changes to the system.


----------



## sepala

Thanks for the reply Terry. So, that means no ubuntu user can be the "root" user? I mean the admin?


----------



## TerryNet

If you want to dig deeper into this read sections 4 and 5 in Ten tips for new Ubuntu users. I understand that the statement about Ubuntu's root having a random password is not correct--in fact, it is just plain locked initially--but otherwise those two sections seem to be correct.


----------



## sepala

Thanks TerryNet. Marking this thread as solved.


----------



## TerryNet

You're welcome.


----------

