cannot execute bash: permission denied
hi...i get the above error when i try to login as root...which as you can imagine is really not very good!!
my .bash_profile is also not the same..it almost has nothing in it...about 3 lines..thats it. ive chmod 755 for the .bash_profile and .bashrc files...and checked lib and bin and they r all ok... even the /bin/bash has 755 mode. any ideas? |
the $PATH is probably bad. Try setting it correctly in .bashrc
|
ok..i'm not sure exactly how to..
i checked PATH with echo...and it gave a long line of /sr/bin:/usr/sbin ... within .bashrc..i dont know if there is a PATH.. could you gimme some more details. |
As a normal user, try to determine where the binary is for bash with
Code:
which bash Then, as root Code:
echo $PATH |
Quote:
(bashrc is not read on login shells) Quote:
|
^
| that is true. |
i tried that..
when i put which bash...it said /bin/bash so i added /bin: to the front of my PATH in the etc/profile file as well as the .bash_profile file. Still not being allowed. |
Have you checked the permissions on /bin/bash?
Try this: Code:
ls -lag /bin/bash |
ya...ive chmoded just about everything to 755
|
This may not fix your current problem, but you probably don't want a binary to be writable by anyone, not even root, since that allows the binary to become corrupt.
You'd probably be better off changing the permissions of /bin/bash to 555. Also, what are the permissions on /bin, the directory? Try Code:
ls -ld /bin |
yeah...theyre all executable by all and readable by all...
i think i just overly messed up..playing too much in root.. think ill just re-install. thanks for you help. good stuff :) |
Had this same exact issue. Turns out the /etc dir was 700 so chmod to 755 and everything was fine.
Hope this helps someone out! Chris |
All times are GMT -5. The time now is 08:44 AM. |