Results 1 to 9 of 9
$ls -l /bin/sh
-rwx-r-x-r-x 1 root root 8132 Apr 3 2002 /bin/sh
When I run any shell script, it tells me this:
bash: ./test: /bin/sh: bad interpreter: Permission denied
Any ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 07-05-2003 #1Linux Engineer
- Join Date
- Nov 2002
- Location
- Queens, NY
- Posts
- 1,319
URGENT
$ls -l /bin/sh
-rwx-r-x-r-x 1 root root 8132 Apr 3 2002 /bin/sh
When I run any shell script, it tells me this:
bash: ./test: /bin/sh: bad interpreter: Permission denied
Any ideas? I tried running this as root and as normal user.The best things in life are free.
- 07-05-2003 #2Linux Guru
- Join Date
- Oct 2001
- Location
- Täby, Sweden
- Posts
- 7,578
8132 bytes? That seems incredibly small for a shell. Can you run /bin/sh at all? Hadn't you installed some shell other than bash? Maybe something has happened to it (I dunno why, but just maybe). Until you can solve it, maybe you had better just "ln -sf bash /bin/sh".
- 07-05-2003 #3Linux Engineer
- Join Date
- Nov 2002
- Location
- Queens, NY
- Posts
- 1,319
Dolda,
Remember, when my /bin/sh is pointing at /bin/ash. That's the result I posted.
Yes, I can invoke ash (/bin/sh) from the command line. It only complains when I try to use it as a shell script. I tried using #!/bin/bash and the samething happens.
Everything was fine a week ago and the only thing that I did to the system was remove the group "brock."The best things in life are free.
- 07-05-2003 #4Linux Engineer
- Join Date
- Jan 2003
- Location
- Lebanon, pa
- Posts
- 994
You sure you are not trying to exec the scripts on a partition mounted with noexec?
- 07-05-2003 #5Linux Guru
- Join Date
- Oct 2001
- Location
- Täby, Sweden
- Posts
- 7,578
Yeah, I thought of that as well, but that just seems too crazy. Can binary programs be executed from the same directory, and do the system shell scripts work (like nroff)?
- 07-06-2003 #6Linux Engineer
- Join Date
- Nov 2002
- Location
- Queens, NY
- Posts
- 1,319
Binary programs can be executed. It's just the shell scripts in any directory keeps popping that message. Any ideas? I'm so confused as to what made this happen on the system.
The best things in life are free.
- 07-06-2003 #7Linux Engineer
- Join Date
- Nov 2002
- Location
- Queens, NY
- Posts
- 1,319
Man, you guys are going to kill me but I realized that the permission in all files in my directory was reset at a certain time. I deeply apologize for this stupid problem.
The best things in life are free.
- 07-06-2003 #8Linux Engineer
- Join Date
- Nov 2002
- Location
- Queens, NY
- Posts
- 1,319
Actaully, I'm glad that I ran into this. Would I just add the word "exec" to the appropriate filed in /etc/fstab to make executables run on mounted partitions?
The best things in life are free.
- 07-06-2003 #9Linux Engineer
- Join Date
- Jan 2003
- Location
- Lebanon, pa
- Posts
- 994
You can execute files by default so as long as it doesn't say noexec, it should work.


Reply With Quote
