LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   su: /bin/bash: Permission denied (https://www.linuxquestions.org/questions/linux-security-4/su-bin-bash-permission-denied-458043/)

fedora4002 06-25-2006 01:34 AM

su: /bin/bash: Permission denied
 
This problem is a bit strange. The machine is installed with FC4. I can log in as root directly. However, whenver I log in as a normal user and use su, the following error appear
su: /bin/bash: Permission denied


The same thing also happens when I tried su xxxx after logging as root.

I checked /bin/bash and file permission and did not see anything wrong. I did google around and did not find any useful suggestion. Thanks in advance for your help.

prozac 06-25-2006 01:50 AM

this thread is relative and might solve your problem too:
http://www.linuxquestions.org/questi...d.php?t=457474

fedora4002 06-25-2006 02:14 AM

After digging around for one hour, finally figure out the reason:
It has something to do with SELINUX. Once I typed setenforce 0, everything is working fine.

Now, it is time to dig around SELINUX. :-(

SlackDaemon 06-25-2006 02:36 AM

Ayup... SELinux caused me great deal of pain while setting up a new website. You will be able to identify if the problem is related to SELinux by searching through /var/log/messages for 'AVC' denials.

If you want to keep on running SELinux but unconfine some binaries and files you'd have to change the security context of the file in question to unconfined_t

chcon -t unconfined_t </path/filename>

hferretluv 10-01-2007 01:24 PM

AVC Denials
 
Quote:

Originally Posted by SlackDaemon (Post 2306792)
Ayup... SELinux caused me great deal of pain while setting up a new website. You will be able to identify if the problem is related to SELinux by searching through /var/log/messages for 'AVC' denials.

If you want to keep on running SELinux but unconfine some binaries and files you'd have to change the security context of the file in question to unconfined_t

chcon -t unconfined_t </path/filename>

sounds good, but what do you do with fedora 7. You change the permissions, and in less than 5 minutes, it's back to the same denials. With friends added. It got to the point where it would not let me use my cd and dvd rom drives, access my mail, etc... And THEN, it started denying anything with defaut_t


What is with selinux?

Thanks

aceqbaceq 01-29-2010 08:46 AM

Quote:

Originally Posted by fedora4002 (Post 2306743)
This problem is a bit strange. The machine is installed with FC4. I can log in as root directly. However, whenver I log in as a normal user and use su, the following error appear
su: /bin/bash: Permission denied


The same thing also happens when I tried su xxxx after logging as root.

I checked /bin/bash and file permission and did not see anything wrong. I did google around and did not find any useful suggestion. Thanks in advance for your help.

i've solved today exactly the same problem by adjusting permissions on all folders in root folder

all folder must be 755

and

lost+found = 770
proc = 555
root = 750
tmp =777


All times are GMT -5. The time now is 06:04 PM.