LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 12-06-2004, 06:16 PM   #1
TomF
Member
 
Registered: Sep 2003
Location: California
Distribution: RH9, Fedora: FC1, FC3, Suse9.3
Posts: 54

Rep: Reputation: 15
Selinux, ./INSTALL: /bin/sh: bad interpreter: Permission denied


I installed fc3 with targeted Selinux. After failing to find any way to get the newrole command to work for the first time, I tried setting various fields in /etc/selinux subdirectories until I got one instance of newrole to work after an su - and selecting one of the available contexts for sysadm. Then newrole worked with the listed contexts, and also newrole newrole -r sysadm_r -t sysadm_t worked, but set the role to sysadm_r:unconfined_t. At that time, all the system administration commands worked, but then I executed:
[root@pcasus ~]# cd /a/b/sata_bulk/fd-mydata/rh9-downloads/fc3/acrobat
[root@pcasus acrobat]# ./INSTALL
-bash: ./INSTALL: /bin/sh: bad interpreter: Permission denied
[root@pcasus acrobat]#

Of course, this is the problem I started with. Everything I have done and everything I have looked up to try to understand what to do about this message has failed. It looks like I have Selinux in permissive mode with enforcing disabled, so I think that all I have accomplished is to establish that this is not a SELINUX message. What should I try next?
 
Old 12-06-2004, 08:17 PM   #2
sigsegv
Senior Member
 
Registered: Nov 2004
Location: Third rock from the Sun
Distribution: NetBSD-2, FreeBSD-5.4, OpenBSD-3.[67], RHEL[34], OSX 10.4.1
Posts: 1,197

Rep: Reputation: 47
This is because there is no /bin/sh most likely. do this: ln -s `which bash` /bin/sh
 
Old 12-08-2004, 11:36 AM   #3
TomF
Member
 
Registered: Sep 2003
Location: California
Distribution: RH9, Fedora: FC1, FC3, Suse9.3
Posts: 54

Original Poster
Rep: Reputation: 15
"bad interpreter" still fails

[tom@pcasus ~]$ ln -s `which bash` /bin/sh
ln: `/bin/sh': File exists
[tom@pcasus ~]$ ls -l /bin/sh
lrwxrwxrwx 1 root root 4 Nov 13 16:44 /bin/sh -> bash
[tom@pcasus ~]$ locate /*bash
/bin/bash

Now I see. Your command did it all at once. It created the link without checking whether it already was there, and ln reported that it was already there. However, the script had not worked before, and, since no changes were made, it probably won't work now. I'll check and report back. I'll also take a working script and copy it to the failing script directory to see if it fails when run from the failing directory.

Meanwhile, any other ideas? I never had troubles like this in fc1.

Last edited by TomF; 12-10-2004 at 12:05 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/usr/bin/env: bad interpreter: Permission denied Master Fox Linux - Software 8 02-09-2012 08:25 AM
/bin/sh: bad interpreter: Permission denied itsaso Linux - Newbie 6 05-18-2005 10:00 AM
: bad interpreter: Permission denied LinuxRam Linux - Newbie 2 08-22-2004 09:33 PM
/bin/sh: bad interpreter: Permission denied linmix Linux - Software 12 08-16-2004 06:40 AM
perl: bad interpreter: Permission denied bulliver Linux - Software 4 01-27-2003 03:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 05:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration