LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Permission denied for root user (https://www.linuxquestions.org/questions/linux-newbie-8/permission-denied-for-root-user-339755/)

shujja 07-04-2005 12:40 AM

Permission denied for root user
 
Hi everybody,

When i login as a root in redhat9, and write any command such as /boot/grub/grub.conf or gedit /etc/inittab, system gives following message
-bash: permission denied.

Plz help me.

WhatsHisName 07-04-2005 01:18 AM

Do you mean logged in as the root user or logged in as a regular user using su in the terminal?

If the second option is the case, try using:

su -

instead of just

su

jacobselvin 07-04-2005 01:59 AM

Are you sure you have permissions to write the file. Do a ls -l on files and make sure you don't have some like r--r--r--. Then you have to change the permission using the chmod command.

Tinkster 07-04-2005 02:46 AM

Re: Permission denied for root user
 
Quote:

Originally posted by shujja
Hi everybody,

When i login as a root in redhat9, and write any command such as /boot/grub/grub.conf or gedit /etc/inittab, system gives following message
-bash: permission denied.

Plz help me.

Well, for the first "command" I understand why you'd get
permission denied, /boot/grub/grub.conf is most likely not
executable, and therefore even root can't run it.


For the "gedit /etc/inittab" I'd like to see a copy & paste of the
actual screen session.


Cheers,
Tink

hardcorelinux 07-04-2005 05:02 AM

Check the permissions of the files,if proper pemissions are not there set the permission as root.

tinyboys 07-04-2005 07:47 AM

hi,
I deleted a user after upgrading from redhat 8 to 9 and I cannot delete the Xauthority files of that user even as root from both the Xwindow and console(bash).
I got the same error access denied.

shujja 07-05-2005 02:11 AM

Hi friends,

thanks for taking interest and providing best help.

i have used the su command as root, which is

[root@localhost root]#su
Password:(type root password)
incorrect login (system replies)

same happen with the command su -

plz tell me the right way of logging in as su or su -

thanks

hk_linux 07-05-2005 03:29 AM

Quote:

Originally posted by shujja

i have used the su command as root, which is

[root@localhost root]#su
Password:(type root password)
incorrect login (system replies)

same happen with the command su -

If you are already in the root, why do you want to do a su to root again? Also, if you are already as the root,
when you do a su (or su - ), you will not be asked for the password.

Quote:

plz tell me the right way of logging in as su or su -
That depends on the situation. The main difference of a su and a su - is that, the .bashrc (i assume u use bash) will
be executed (or rather sourced ;) ) when you do a su -.

HTH.

sunardy 10-28-2014 07:56 PM

hi dear all,

i have some problem.

after i log on as root.
and and type dir, i got error message like this :
#dir
bash: /usr/bin/dir:permission denied.

and when I run ls -l
#ls -l , i see
-rw-r--r-- 1 root root
-rw-r--r-- 1 root root
-rw-r--r-- 1 root root
-rw-r--r-- 1 root root
-rw-r--r-- 1 root root

so whats the mind of some error was in my command prompt?

thanks.

jkirchner 10-28-2014 08:32 PM

Quote:

Originally Posted by sunardy (Post 5261065)
hi dear all,

i have some problem.

after i log on as root.
and and type dir, i got error message like this :
#dir
bash: /usr/bin/dir:permission denied.

and when I run ls -l
#ls -l , i see
-rw-r--r-- 1 root root
-rw-r--r-- 1 root root
-rw-r--r-- 1 root root
-rw-r--r-- 1 root root
-rw-r--r-- 1 root root

so whats the mind of some error was in my command prompt?

thanks.

Why are you responding to a 9 year old thread? You should start your own question


All times are GMT -5. The time now is 12:26 AM.