Running an executable in a mounted partition

This is a discussion about Running an executable in a mounted partition in the Everything Linux category; I am not able to run any executable file in a mounted partition(whether its a script or binary). Can anyone explain why its not possible to run an exe in a mounted partition? Any solution for this problem? Note: I am able to run a script by $ sh script-name when I am giving, I get the following error $.

Everything Linux 1800 This topic was started by , . Last reply by ,


data/avatar/default/avatar31.webp

5 Posts
Location -
Joined 2002-11-21
I am not able to run any executable file in a mounted partition(whether its a script or binary).
 
Can anyone explain why its not possible to run an exe in a mounted partition? Any solution for this problem?
 
Note:
I am able to run a script by
$ sh script-name
when I am giving, I get the following error
$ ./script-name (eventhough executable permission is set)
bash:./script-name: /bin/sh: bad interpreter: Permission denied
 
 
When I am running a binary,
$ ./a.out
bash: ./a.out: Permission denied
 
Regards,
Valluvan.

Participate in our website and join the conversation

You already have an account on our website? To log in, use the link provided below.
Login
Create a new user account. Registration is free and takes only a few seconds.
Register
This subject has been archived. New comments and votes cannot be submitted.
May 13
Created
May 19
Last Response
0
Likes
1 minute
Read Time
User User
Users

Responses to this topic


data/avatar/default/avatar02.webp

169 Posts
Location -
Joined 2003-03-02
Ok the awnser is puzzling me, but it could be as simple as setting
execute permision as root.
 
You can do this by typing su chmod a+x yourFile.sh
 
try doing this:
$ echo > test.sh echo "Hello world"
 
$ ./test.sh
:bash ./test.sh: Permission denied // this is normal
 
// to execute the script test.sh you have to make the file executable
 
$ chmod a+x test.sh
$ ./test.sh
Hello world
 
If all this has helped you please read man page chmod.
$ man chmod.

data/avatar/default/avatar31.webp

5 Posts
Location -
Joined 2002-11-21
OP
Quote:I am not able to run any executable file in a mounted partition(whether its a script or binary).

when I am giving, I get the following error
$ ./script-name (eventhough executable permission is set)
bash:./script-name: /bin/sh: bad interpreter: Permission denied


Hi,

I have set the executable permission for the script using chmod, even though I am not able to execute it directly ie I have to give sh scriptname to run the script!

Regards,
Valluvan.