File Permissions / root

Toby Kelsey toby_kelsey at ntlworld.com
Fri Jan 27 17:56:41 UTC 2006


Ray Canzius wrote:
> Gday All,
> 
> 
> My problem is that although I have logged in and am the only person
> using computer, and I also installed software, when it asked for
> name,id,passwords etc I put myself as user (nobody else), I have looked
> at viewing and changing files. Every time I try to write file to hard
> drive  it tells me I do not have permission, when I look at who is the
> owner of file(s) it tells me that the owner is root. 
> 
> OK, what have I done wrong, has there anything I may have missed at
> install, and how do I change this ?

The way Ubuntu (Linux/Unix) works is that most "system administration" type things
like installing software and modifying system files can only be done by the administrator
user (root). When you need to change these things you can use the 'sudo' command which
lets you become root temporarily.  You might be asked for your password as a check.
Some administrative commands in menus (eg Synaptic) can run sudo automatically when they start.

For your own files and documents, your "home" directory in /home/yourname and the Documents
folder can be used without being root.  Also temporary files in /tmp can be changed as a
normal user.

So for documents or files you create and modify yourself, put them in Documents or your home directory.

For changing system settings, use sudo.

Normally when you install software it goes in the system area and so you need to be the
administrator to set it up, otherwise you will get lots of 'Permission denied' errors.

You can also install software in your home directory as a normal user, but that is not normally
necessary or preferable.

I hope this makes things clearer.

Cheers,
Toby




More information about the ubuntu-users mailing list