Help - Search - Members - Calendar
Full Version: Permission Denied!
Linuxhelp > Support > Technical Support

First of all, i am a linux newbie and i have a problem. I need to chesk various files such as /etc/hosts and thins like that but every time i try it tells me Permission denied. I am using mandrake 9.0 an when i try to go to those files i am logged on as root, so i don't know what to do.

1. how are you logged in as root:

(for example, are you logged it mandrake as the root user from a GUI login ... logged in as root via a console login, logged in as a user with a root terminal window open, etc...)

2. how are you trying to access the files:

(for example, with vi in a terminal window, with vi from the console, with kate (or gedit) from the menu, etc.)
i logged in with the gui login and tried to access them from a terminal window
in the teminal window, use the command:


and make sure it tells you that you are root..

to edit the files (or look at them) you need to use a program ... if you are typing just the name of the file, then you are trying to execute the file instead of opening it with a viewing program.

The easiest way to edit these type of files is to use gedit (if you use gnome) or kate (if you use kde) .... or to use a console type editor (joe, vim, pico, nano) from a console window.

The easiest way to see the text file, but not be able to change it is to use the command:

less path_to_program

where path_to_program is the full path to the program, like /etc/ can also go the the required directory and just use the file name so both these commands will let you see /etc/hosts:

less /etc/hosts


cd /etc
less hosts
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2018 Invision Power Services, Inc.