LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   /usr/bin/env: bad interpreter: Permission denied (https://www.linuxquestions.org/questions/linux-software-2/usr-bin-env-bad-interpreter-permission-denied-262601/)

Master Fox 12-04-2004 03:46 PM

/usr/bin/env: bad interpreter: Permission denied
 
I am getting this problem,

wolfcub:/home/lordsep/BitTornado-CVS# ./btdownloadheadless.py
bash: ./btdownloadheadless.py: /usr/bin/env: bad interpreter: Permission denied


I downloaded BitTorando linux version, console since i cant run vnc on it but when i try to run the file i get

./btdownloadheadless.py: /usr/bin/env: bad interpreter: Permission denied


this is on debian 3.0 any help??

monohouse 12-04-2004 03:57 PM

usually "Permission Denied" happens when you don't have access to something, in this case probably the file /usr/bin/env,
I suggest you try running that as root, see what happens

Master Fox 12-05-2004 06:45 AM

I was in root, but i kind of fixed it now, thanks alot for the help

mustafakyr 02-14-2009 01:07 AM

Quote:

Originally Posted by Master Fox (Post 1332025)
I was in root, but i kind of fixed it now, thanks alot for the help

Please Explain how you fixed it, I am suffereing from the same problem.

Master Fox 02-15-2009 06:58 PM

Intresting.. Blimey this dates back to 2004.

Err. All I can suggest is has the file got executable permissions? - try: "chmod +x <filename>" - I'll try to remeber what I did or was doing wrong.

khunrath 03-01-2009 06:33 PM

Possible answer
 
Having the same problem in vector linux 6.0 installing TeXLive2008. Found these in penguinparens.blogspot.com

"The partition your script lives on may be mounted with the "user" option set. "user" implies "noexec" (see the manpage for "mount"), which is going to keep you from running executables. And while running a binary executable from this kind of partition fails more clearly, trying to run a script with a shebang gives you this more confusing error message.

To fix! Add "exec" after your "user" flag in /etc/fstab. (again, see "man mount")."

Worked for me. :)

mustafakyr 03-05-2009 01:19 AM

Quote:

Originally Posted by khunrath (Post 3461778)
Having the same problem in vector linux 6.0 installing TeXLive2008. Found these in penguinparens.blogspot.com

"The partition your script lives on may be mounted with the "user" option set. "user" implies "noexec" (see the manpage for "mount"), which is going to keep you from running executables. And while running a binary executable from this kind of partition fails more clearly, trying to run a script with a shebang gives you this more confusing error message.

To fix! Add "exec" after your "user" flag in /etc/fstab. (again, see "man mount")."

Worked for me. :)

I found an "noexec" definition in the /etc/fstab and change it to "exec" , problem solved. I was trying to install the vmware player to linux, and the installation script was extracting executable file into /tmp folder. This folder was in another partition with "noexec" spec in fstab.

erikig 12-04-2011 02:30 AM

Fixing This
 
I ran into this issue when installing VMWare Player 4.0 on CentOS so I figured I'd share how it was resolved.

In my case, VMWare installer extracts and runs from my /tmp directory which was mounted with noexec permissions. I found this out by running mount.
I fixed it by remounting with mount -o remount

Code:

Extracting VMware Installer...done.
VMware-Player-4.0.0-471780.i386.bundle: /tmp/vmis.Y21747/install/vmware-installer/vmware-installer: /usr/bin/env: bad interpreter: Permission denied

root@server# mount
/dev/sda5 on / type ext3 (rw,usrquota)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda8 on /home type ext3 (rw,usrquota)
/dev/sda6 on /tmp type ext3 (rw,noexec,nosuid) <----- BROKEN, Causes issue
/dev/sda3 on /usr type ext3 (rw,usrquota)
/dev/sda2 on /var type ext3 (rw,usrquota)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)

root@server# mount -o remount,exec /dev/sda6

root@server# mount
/dev/sda5 on / type ext3 (rw,usrquota)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda8 on /home type ext3 (rw,usrquota)
/dev/sda6 on /tmp type ext3 (rw,nosuid) <----- FIXED
/dev/sda3 on /usr type ext3 (rw,usrquota)
/dev/sda2 on /var type ext3 (rw,usrquota)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)


jozsefsamuel 02-09-2012 08:25 AM

I had the same issue with out installer
 
Hi,

I had the same issue with my installer... I fought for hours trying to figure out why I could not execute the internal script :(
At last, I managed to do it - see my comment at: http://www.greensql.com/content/trie...d-what-do-i-do

It's GREAT, now everything works!


All times are GMT -5. The time now is 08:29 PM.