File permissions problem

NoOp glgxg at sbcglobal.net
Sat Aug 16 23:27:46 UTC 2008


On 08/16/2008 03:10 PM, Joep L. Blom wrote:
> Ansgar Burchardt schreef:
>> Hi,
>> 
>> "David McNally" <david3333333 at gmail.com> writes:
>>> I'm trying to be able to access and edit files that aren't in my home folder,
>>> but the computer says that I don't have permission to access the files.
>>>
>>> I'm the only person that has ever used this computer.
>> 
>> Files not in /home usually belong to root (the administration account),
>> some belong to other system accounts.  On Ubuntu you can not directly
>> log in as root, but you can use sudo to access the root account.
>> See [1] for an explanation how to do this.
>> 
>> Regards,
>> Ansgar
>> 
>> [1] https://help.ubuntu.com/community/RootSudo
>> 
> login as root:
> user$"su -"
> passwd:"password"
> 
> Then you are root. ( always make a root window in xterm.).
> Joep
> 
> 

Please don't advise an apparently new user to create a root account.
It's not necessary, and can be dangerous for someone that is still
learning how to edit non-home (root) files.

@David: please read the page provided by Ansgar
(https://help.ubuntu.com/community/RootSudo) so that you have an
understanding of the sudo command. To edit your root configuration files
from the standard text editor:

>From the terminal (Applications|Accessories|Terminal):

gksu gedit <filename>

(at the password prompt enter your standard user password)

>From the desktop:
Alt-F2
gksu gedit <filename>

>From Nautilus (the 'Places' file browser/manager)
Alt-F2
gksu nautilus

(you are now in a 'sudo' mode of Nautilus, so you can click on file to
open in the text editor. *Caution* in this mode you can also delete and
modify critical system files and totally screw up your system - this is
akin to being able to go into the Windows directory on Windows and
modify or delete any files there, so use with caution if you do not know
what you are doing!!).

You can also install the Nautilus administrator add-on which enables you
to have a menu option in your standard nautilus to edit a file in
adminstrator mode. To install - open the terminal and enter:

sudo apt-get install nautilus-gksu

Log out and log back in. Now open Nautilus (Places) and go to the root
configuration file that you wish to modify (example: /etc/hosts), right
click the file and select 'Open as administrator', enter your password
at the prompt. Nautilus will then open the file in the text editor in
'sudo' mode so that you can modify, change it, and save it. The text
editor will also automatically create a backup file (/etc/hosts~) that
you can go back to if you mess something up.








More information about the ubuntu-users mailing list