galfenol

Q: bad interpreter: Operation not permitted on Lion 10.7.3

My unix scripts are now dead, after the upgrade to 10.7.3. A typical error message is   /bin/bash: bad interpreter: Operation not permitted  Googling this issue shows other people are having build scripts fail and are fixing this by renaming links to libraries.  My scripts are simple, they just run an executable, or used to...  something like this:

#! /bin/bash

./myprogram << EOF

$1

EOF

MacPlus, SE30, iMacG3, EmacG4, PB G4, iMacG5, PowerMacG5, iMac Intel, Mac OS X (10.7.2)

Posted on Feb 13, 2012 4:00 PM

Close

Q: bad interpreter: Operation not permitted on Lion 10.7.3

  • All replies
  • Helpful answers

first Previous Page 5 of 5
  • by febeling,

    febeling febeling Jul 30, 2012 8:32 AM in response to Frank Caggiano
    Level 1 (0 points)
    Jul 30, 2012 8:32 AM in response to Frank Caggiano

    This problem can be especially confusing when working with a disk image. It looks like the com.apple.quarantine attribute is being inherited from the disk image file to the files inside.

  • by HumbiJ,

    HumbiJ HumbiJ Oct 2, 2012 4:29 AM in response to galfenol
    Level 1 (0 points)
    Oct 2, 2012 4:29 AM in response to galfenol

    Has anyone got skype so they can give me a step by step way to do this if so please add me, I am 12 so dont not add me cause of my age i just really need help with this. My skype, craig.burden3

  • by dselevan,

    dselevan dselevan Oct 11, 2012 8:05 AM in response to galfenol
    Level 1 (0 points)
    Oct 11, 2012 8:05 AM in response to galfenol

    I could use some help with a similar error. I'm not a programmer. I installed VirtualBox, and decided to go with Parallels. When I double click VirtualBox_Uninstall.tool, I get:

    Last login: Thu Oct 11 07:53:04 on console

    /Volumes/VirtualBox/VirtualBox_Uninstall.tool ; exit;

    davids-iMac:~ david seln$ /Volumes/VirtualBox/VirtualBox_Uninstall.tool ; exit;

    -bash: /Volumes/VirtualBox/VirtualBox_Uninstall.tool: /bin/sh: bad interpreter: Operation not permitted

    logout

     

     

    [Process completed]

     

    Any ideas?

  • by VikingOSX,

    VikingOSX VikingOSX Oct 12, 2012 8:49 AM in response to dselevan
    Level 7 (20,606 points)
    Mac OS X
    Oct 12, 2012 8:49 AM in response to dselevan

    From our recent conversation, i know you have resolved the VirtualBox removal issue. Should you have a future bad interpreter: Operation not permitted issue, the following link has a solution that works for that error. It is similar to Linc's Find syntax earlier in this post.

  • by marbles1,

    marbles1 marbles1 Nov 2, 2012 2:46 PM in response to galfenol
    Level 1 (0 points)
    Nov 2, 2012 2:46 PM in response to galfenol

    Got the same error message. A piece of sell script used to run well could not run any more after I modified with it with textEdit.

     

    I open the file with pico, and save and exit. Then it works again.

  • by VikingOSX,

    VikingOSX VikingOSX Nov 2, 2012 5:05 PM in response to marbles1
    Level 7 (20,606 points)
    Mac OS X
    Nov 2, 2012 5:05 PM in response to marbles1

    TextEdit is not a true code editor, and in your case, may add undesireable attributes to your code.

     

    Pico, vi, vim, Sublime Text 2, Chocolate, Textmate, Xcode editor, and others treat code as code, hence your experience with Pico.

  • by crjohnson,

    crjohnson crjohnson Nov 2, 2012 6:08 PM in response to VikingOSX
    Level 1 (15 points)
    Nov 2, 2012 6:08 PM in response to VikingOSX

    VikingOSX wrote:

     

    TextEdit is not a true code editor, and in your case, may add undesireable attributes to your code.

     

    Pico, vi, vim, Sublime Text 2, Chocolate, Textmate, Xcode editor, and others treat code as code, hence your experience with Pico.

    actually if you know how to use it.. it is a true text editor and will not add anything weird.

     

    The errors here have nothing to do with the file itself, but Gatekeeper.

  • by BobHarris,

    BobHarris BobHarris Nov 2, 2012 6:18 PM in response to VikingOSX
    Level 6 (19,272 points)
    Mac OS X
    Nov 2, 2012 6:18 PM in response to VikingOSX

    If you really want to use a GUI text editor, then download the free TextWrangler.

    <http://www.macupdate.com/info.php/id/11009/textwrangler>

  • by R3TR0,Solvedanswer

    R3TR0 R3TR0 Nov 9, 2012 3:21 PM in response to anticro
    Level 1 (10 points)
    Nov 9, 2012 3:21 PM in response to anticro

    anticro wrote:

     

    All these answers are useless spam! The only thing that says what's really going on and a solution that works is described here:

     

    http://stackoverflow.com/questions/9952612/mac-os-usr-bin-env-bad-interpreter-op eration-not-permitted

     

    Short: run this command and you should be fine.

    xattr -d com.apple.quarantine <YOUR FILE HERE>

    thank u so mutch, your solution work and save my time, and of cource i completely agree with u: about 4 pages of useless spam

  • by alibaba0,

    alibaba0 alibaba0 Dec 20, 2012 4:59 AM in response to febeling
    Level 1 (0 points)
    Dec 20, 2012 4:59 AM in response to febeling

    Thank you so much febeling! I was going mad.

  • by pklunavat,

    pklunavat pklunavat Jan 28, 2013 5:00 AM in response to Frank Caggiano
    Level 1 (0 points)
    Jan 28, 2013 5:00 AM in response to Frank Caggiano

      this is the one that got me past my permission denied.  this was the one.  the article is genius giving options of de-quaratining a file, folder or system.  superb job!  onwards and upwards... 

  • by mikeamy,

    mikeamy mikeamy Apr 10, 2013 4:05 AM in response to galfenol
    Level 1 (0 points)
    Apr 10, 2013 4:05 AM in response to galfenol

    I had this problem too, appearing on 10.8.3

     

    It appeared after I had some FS damage, I think due to VirtualBox creating a VDI badly. I repaired the FS and the permissions. After that I saw this error when trying to run scripts that I work on inside a HFS+ case sensitive disk image. The same problem was happening for very simple scripts I created after the problem started.

     

    None of the suggestions I have read in this thread resolved the issue. What eventually resolved it for me was to create a new disk image, copy the files across, and then, for each script, to do:

     

    cat script > new_script

    rm script

    chmod +x new_script

    mv new_script script

     

    Hours were wasted figuring out this problem.

  • by NineFeetHigh,

    NineFeetHigh NineFeetHigh Jun 3, 2016 1:54 AM in response to anticro
    Level 1 (8 points)
    Mac OS X
    Jun 3, 2016 1:54 AM in response to anticro

    When running the command (xattr -d com.apple.quarantine <YOUR FILE HERE>) through an application environment I'm having error:

     

    xattr: [Errno 1] Operation not permitted: <YOUR FILE HERE>


    How I can fix this? Which command I should use to overcome? I'm on Yosemite.

first Previous Page 5 of 5