LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-17-2008, 01:02 AM   #1
mierdatuti
Member
 
Registered: Aug 2008
Posts: 64

Rep: Reputation: 15
[SOLVED] problem executing scripts


Hi,

I have red-hat 5. I mount the cdrom and I try to execute any script of the cd-rom and it's imposible, for instance:

[root@localhost pre_req]# ./check_req.sh
bash: ./check_req.sh: /bin/sh: bad interpreter: Permiso denegado

[root@localhost pre_req]# ls -ltr check_req.sh
-rwxr-xr-x 1 725 324 56751 jul 6 22:55 check_req.sh


I can't understand because if I mount the same cd-rom on suse I don't have any problema,

Could you help me?
thnaks a lot

Last edited by mierdatuti; 09-19-2008 at 04:22 AM. Reason: It's solved
 
Old 09-17-2008, 01:20 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Which distribution are you running? RH5? Is this the Enterprise version?

Anyway, try running the script as an argument to sh: for example; "sh /media/cdrom/check_req.sh"

The iso9660 filesystem may be mounted with the noexec option by your system.
 
Old 09-17-2008, 02:19 AM   #3
mierdatuti
Member
 
Registered: Aug 2008
Posts: 64

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jschiwal View Post
Which distribution are you running? RH5? Is this the Enterprise version?

Anyway, try running the script as an argument to sh: for example; "sh /media/cdrom/check_req.sh"

The iso9660 filesystem may be mounted with the noexec option by your system.

thanks.. if I execute source check_req.sh it works but if the script call other if fail again.

I have the version Enterpise....why do you ask me these?

Thanks a lot and sorry for my english!
 
Old 09-18-2008, 04:51 AM   #4
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 676

Rep: Reputation: 137Reputation: 137
Quote:
Originally Posted by mierdatuti View Post
thanks.. if I execute source check_req.sh it works but if the script call other if fail again.

I have the version Enterpise....why do you ask me these?

Thanks a lot and sorry for my english!
The ofter reason for "bad interpreter" error message is '\r' in the scripts
(It usually got here when files edited on DOS/Windows and then copied to Unix)

I don't know why you able execute it on Suse - may be cdrom mounted with differnts options ? See 'man mount' - conv=auto may help
 
Old 09-19-2008, 04:21 AM   #5
mierdatuti
Member
 
Registered: Aug 2008
Posts: 64

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Valery Reznic View Post
The ofter reason for "bad interpreter" error message is '\r' in the scripts
(It usually got here when files edited on DOS/Windows and then copied to Unix)

I don't know why you able execute it on Suse - may be cdrom mounted with differnts options ? See 'man mount' - conv=auto may help
Thanks.

The problem was that red hat enterprise linux 5 mount the cdrom with option -noexec.

Many thanks!
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Executing scripts jonette20 Linux - General 3 10-15-2007 01:50 PM
executing Bash Scripts c4nk Linux - General 3 03-11-2007 04:52 PM
problem executing user created scripts on console farooqmaniar Linux - Software 1 01-12-2006 06:06 PM
problem executing scripts on mounted fat32 partition roald Linux - General 8 06-14-2004 06:02 AM
Executing scripts upon login jungatheart Linux - Newbie 3 04-19-2004 06:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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

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