Getting "Operation not permitted" on a launch agent

Hi,
I just recently upgraded to OS X Mavericks (10.9.1) from 10.7.5.  Previously, I had this plist file in my /Library/LaunchDaemons directory …
          <?xml version="1.0" encoding="UTF-8"?>
          <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
          <plist version="1.0">
          <dict>
                  <key>Disabled</key>
                  <false/>
                  <key>Label</key>
                  <string>MemCache</string>
                  <key>ProgramArguments</key>
                  <array>
                          <string>sudo</string>
                          <string>-u</string>
                          <string>davea</string>
                          <string>memcached</string>
                          <string>-vvv</string>
                          <string>&gt;</string>
                          <string>/Users/davea/memcached.log</string>
                          <string>2&gt;&amp;1</string>
                  </array>
                  <key>RunAtLoad</key>
                  <true/>
          </dict>
          </plist>
everything was working fine before the upgrade, but after the upgrade, the process fails to start with the error, “Operation not permitted.  An attempt was made to perform an operation limited to processes with appropriate privileges or to the owner of a file or other resources.” 
What do I need to do differently above to heal the pain?
Thanks, -

The interpreter is the thing that comes after "#!"; in your case, /bin/bash. Are you able to open a shell in Terminal? If so, what is your shell, and what do you get from
ls -Oel /bin/bash
and
codesign -vv /bin/bash

Similar Messages

  • Operations not permitted

    Hi
    I have a MacBook Pro with a corrupted copy of Snow Leopard 10.6.8 installed on the HD (I say corrupted because if I try selecting the HD as the startup disk I'm locked at the pretty spinning gear screen). The problem started when I went a little OCD on system files and tried to make everything look pretty but accidentily deleted necessary things... IE... the entire utilities folder and what not... anyway I'm using my factory install disk with Snow Leopard 10.6.3 to run Disk Utility and Verify/Repair the permissions but I keep getting "operations not permitted", errors... I'm semi-comfortable in using the Terminal from my OS disk if anyone knows the commands necessary to fix the permission issues.
    Any help is greatly appreciated -- I really don't want to lose my files (Silly me... I never used Time Machine or a external HD to backup anything important) and I'd like to have my Mac running smoothly!
    Thanks so much,
    Timothy

    You should not be getting any kind of error message when trying to install, if you're booted from the DVD. I can't comment further on that without knowing what the message is.
    As for backing up, you can do that within Disk Utility, but you should have done it long before now. If you don't make regular backups, you'll inevitably lose all your data.
    Mac OS X v10.5, v10.6: How to back up and restore your files

  • Changed Ulimits values for the Oracle user and getting error -bash: ulimit: max user processes: cannot modify limit: Operation not permitted when logging in.

    I'm trying to increate the ulimits for max user processes and open files for the oracle user.  I've set the values in limits.conf, /etc/profile and in oracle's environment scripts. Now when I log in as oracle I get the below errors. If I change the ulimits back to the original values errors go away but ulimits aren't changed.
    login as: oracle
    [email protected]'s password:
    Last login: Fri Mar  6 09:56:02 2015 from mtkadmin12
    You are logging onto an Oracle system.
    Kickstarted on: 2014-06-05
    -bash: ulimit: max user processes: cannot modify limit: Operation not permitted
    -bash: ulimit: max user processes: cannot modify limit: Operation not permitted
    [oracle@servername ~]$

    Thanks for the update.
    I modified the /etc/security/limits.d/90-nproc.conf and added a line for oracle and also modifed the oracle.sh file.  The ulimits are setting correctly when I su - oracle but they are still wrong when sshing in as oracle.
    [root@mtkdevorap11d-1 ~]# su - oracle
    [oracle@mtkdevorap11d-1 ~]$ ulimit -Ha
    core file size          (blocks, -c) unlimited
    data seg size           (kbytes, -d) unlimited
    scheduling priority             (-e) 0
    file size               (blocks, -f) unlimited
    pending signals                 (-i) 1030982
    max locked memory       (kbytes, -l) 94371840
    max memory size         (kbytes, -m) unlimited
    open files                      (-n) 65536
    pipe size            (512 bytes, -p) 8
    POSIX message queues     (bytes, -q) 819200
    real-time priority              (-r) 0
    stack size              (kbytes, -s) unlimited
    cpu time               (seconds, -t) unlimited
    max user processes              (-u) 16384
    virtual memory          (kbytes, -v) unlimited
    file locks                      (-x) unlimited
    [oracle@mtkdevorap11d-1 ~]$
    [oracle@mtkdevorap11d-2 ~]$ ssh mtkdevorap11d-1
    Last login: Mon Mar 16 13:04:16 2015 from mtkdevorap11d-2.conveydev.com
    You are logging onto an Oracle system.
    Kickstarted on: 2014-06-05
    [oracle@mtkdevorap11d-1 ~]$ ulimit -Ha
    core file size          (blocks, -c) unlimited
    data seg size           (kbytes, -d) unlimited
    scheduling priority             (-e) 0
    file size               (blocks, -f) unlimited
    pending signals                 (-i) 1030982
    max locked memory       (kbytes, -l) 64
    max memory size         (kbytes, -m) unlimited
    open files                      (-n) 4096
    pipe size            (512 bytes, -p) 8
    POSIX message queues     (bytes, -q) 819200
    real-time priority              (-r) 0
    stack size              (kbytes, -s) unlimited
    cpu time               (seconds, -t) unlimited
    max user processes              (-u) 16384
    virtual memory          (kbytes, -v) unlimited
    file locks                      (-x) unlimited
    [oracle@mtkdevorap11d-1 ~]$

  • "at" command line broken in 10.10.3?  I get "at: cannot regain privs: Operation not permitted"

    After updating to Yosemite 10.10.3, I notice that I can't use the "at" command from the command line in my account. I get the error:
        at: cannot regain privs: Operation not permitted
    It does seem to work if I sudo, but I have some scripts which I don't want to change.
    I don't need to do this very often, so something else other than the 10.10.3 update may have triggered this problem.
    Solution?

    Linc,
    I tried creating the at.allow file, and it didn't help. It still gives me the same error message. Any other ideas?

  • Can't get rid of files with sudo rm: Operation not permitted?!?

    I just noticed that I have a few directories in my files that have a username of "unknown" from GetInfo (username of 314112960 from ls -l) and can't be touched by me. I opened Terminal, and tried to "sudo chown" and "sudo chmod" them; both came back with "Operation not permitted". Can someone tell me how it's possible that su is not allowed to touch them, and more importantly, how I go about civilizing them so that I can see what's there and get rid of it? Thanks,
    Mike

    ls -lod yourfile
    If it says schg, then you have to reboot into single
    user's mode (hold down command-s while the machine
    reboots), then run fsck (the prompts will suggest
    what to type, so you don't have to memorize it here),
    then mount the file system, run fsck again if there
    was a problem reported the first time, and when you
    get the all clear, then navigate to where the file
    is, issue the command
    chflags noschg yourfile
    rm -R yourfile
    and then run fsck one more time (it helps to be
    paranoid) and then reboot.
    Thanks for the specific instructions! I did that and here's what happened.
    The first fsck said everything was fine. The chflags was ok as well. I tried to chown both directories then, to see what was there, and the first time it failed with a "operation not allowed" error. I then did rm -R on one of the directories, and it disappeared. I then tried the chown again on the other one, and it worked! Weird. Maybe there's some latency here somehow. Anyway, I decided I wanted the whole thing gone and I did an rm -Rf on it, and it deleted almost everything, except for one file, which was a link to a nonexistent file (it had an ls -l of "lrwxrwxrwx" (is that a hard link?). When I try to delete that one, it says "no such file or directory". I thought rm was supposed to delete the link, not the file the link is pointing to! Anyway, I couldn't think of any way to get rid of it - it just won't let me do it. Anyone have any ideas how to get rid of this link? It's sitting at the bottom of a long tree of directories and I'd now like the whole thing gone... Oh and then I fsck'd again, which said no error, and I rebooted. Finder won't let me delete it either (error 43, file cannot be found). What do you think?
    Thanks,
    Mike

  • Operation not permitted after software update

    My fiancés computer cannot open any websites comes up with 'the operation couldn't be completed. Operation not permitted' (INSPOSIXErrorDomain:1) Please choose Safari>Report Bugs to apple'. When checking for software updates it comes up with the error message 'Failed to check for updates. The operation could not be completed. Operation not permitted' It's a macbook pro bought in 2011 with OS X Lion 10.7.3 and Safari 5.1.3. I have checked the settings, reset safari, emtied the cache. I don't know what to do... any help?

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It won’t solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    Third-party system modifications are a common cause of usability problems. By a “system modification,” I mean software that affects the operation of other software -- potentially for the worse. The following procedure will help identify which such modifications you've installed. Don’t be alarmed by the complexity of these instructions -- they’re easy to carry out and won’t change anything on your Mac.
    These steps are to be taken while booted in “normal” mode, not in safe mode. If you’re now running in safe mode, reboot as usual before continuing.
    Below are several lines of text in monospaced type, which are UNIX shell commands. They’re harmless, but they must be entered exactly as given in order to work. If you have doubts about the safety of running these commands, search this site for other discussions in which they’ve been used without any report of ill effects.
    Some of the commands will line-wrap or scroll in your browser, but each one is really just a single line, all of which must be selected. You can accomplish this easily by triple-clicking anywhere in the line. The whole line will highlight, and you can then either copy or drag it. The headings “Step 1” and so on are not part of the commands.
    Note: If you have more than one user account, Step 2 must be taken as an administrator. Ordinarily that would be the user created automatically when you booted the system for the first time. The other steps should be taken as the user who has the problem, if different. Most personal Macs have only one user, and in that case this paragraph doesn’t apply.
    To begin, launch the Terminal application; e.g., by entering the first few letters of its name in a Spotlight search. A text window will open with a line already in it, ending either in a dollar sign (“$”) or a percent sign (“%”). If you get the percent sign, enter “sh” (without the quotes) and press return. You should then get a new line ending in a dollar sign.
    Step 1
    Copy or drag -- do not type -- the line below into the Terminal window, then press return:
    kextstat -kl | awk '!/com\.apple/{printf "%s %s\n", $6, $7}'
    Post the lines of output (if any) that appear below what you just entered (the text, please, not a screenshot.)
    Step 2
    Repeat with this line:
    sudo launchctl list | sed 1d | awk '!/0x|com\.(apple|openssh|vix)|edu\.mit|org\.(amavis|apache|cups|isc|ntp|postfix|x)/{print $3}'
    This time, you'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up. You don't need to post the warning.
    Step 3
    launchctl list | sed 1d | awk '!/0x|com\.apple|edu\.mit|org\.(x|openbsd)/{print $3}'
    Step 4
    ls -1A /e*/mach* {,/}L*/{Ad,Compon,Ex,Fram,In,Keyb,La,Mail/Bu,P*P,Priv,Qu,Scripti,Servi,Spo,Sta}* L*/Fonts 2> /dev/null
    Important: If you synchronize with a MobileMe account, your me.com email address may appear in the output of the above command. If so, anonymize it before posting.
    Step 5
    osascript -e 'tell application "System Events" to get name of every login item'
    Remember, steps 1-5 are all drag-and-drop or copy-and-paste, whichever you prefer -- no typing, except your password. Also remember to post the output.
    You can then quit Terminal.

  • Open error 1 - Operation not permitted' error when checking permissions

    Hi
    I just installed Snow Leopard on a clean HD, and when checking permissions I get these errors:
    Repairing permissions for “Internal HD”
    Open error 1: "Operation not permitted" on System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib-dynlo ad/itertools.so
    Open error 1: "Operation not permitted" on System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/PyObj C/CoreFoundation/_CFRunLoopObserver.so
    Open error 1: "Operation not permitted" on System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/imputil.p yo
    Open error 1: "Operation not permitted" on System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac/ Carbon/Appearance.pyc
    Open error 1: "Operation not permitted" on System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac/ lib-scriptpackages/StdSuites/_init_.pyo
    Open error 1: "Operation not permitted" on System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/test/test _inspect.pyc
    Open error 1: "Operation not permitted" on System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/PyObj C/AppKit/_appmain.so
    Open error 1: "Operation not permitted" on System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/dateu til/relativedelta.py
    Open error 1: "Operation not permitted" on System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/numpy /ma/mrecords.py
    Open error 1: "Operation not permitted" on System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/zope/ interface/adapter.pyc
    Open error 1: "Operation not permitted" on System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils /msvc9compiler.pyc
    Open error 1: "Operation not permitted" on System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/email/tes t/testemailrenamed.pyo
    Open error 1: "Operation not permitted" on usr/sbin/stdhosts
    Open error 1: "Operation not permitted" on Applications/Utilities/Boot Camp Assistant.app/Contents/Resources/fi.lproj/MainMenu.nib/keyedobjects.nib
    Warning: SUID file "System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/MacOS/ARDAg ent" has been modified and will not be repaired.
    Open error 1: "Operation not permitted" on System/Library/Tcl/tcllib1.11/fileutil/multiop.tcl
    Warning: SUID file "System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/Reso urces/Locum" has been modified and will not be repaired.
    Is there anything to look out for here? What have I done wrong? Did I reformat my drive incorrectly? I chose Mac OS Extended (Journaled).
    Tried also to fix permissions from the install disk but got the same errors.
    Any help would be appreciated. Thanks

    acquiesce wrote:
    Hmm I haven't seen so many errors either.
    the number of errors is not high at all. Leopard would very often produce at least 3 to 4 times as many.
    It could have something to do with me running snow leopard on a Macbook Pro 2.16 core duo and not a core 2 duo... ?
    no, that would not have anything to do with it. as i said, those are most likely just errors in the permissions database. as i said, leopard was notorious for those. snow leopard is not as bad but produces a number of them too. I just haven't seen this particular kind of messages before. reinstalling SL will fix them but it seems like a serious overkill in this case.

  • 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

    The interpreter is the thing that comes after "#!"; in your case, /bin/bash. Are you able to open a shell in Terminal? If so, what is your shell, and what do you get from
    ls -Oel /bin/bash
    and
    codesign -vv /bin/bash

  • Operation not permitted - Permission errors when restoring

    Hi Guys,
    I'm trying to restore some files from a time machine backup from a DIFFERENT machine (i.e. browse other Time Machines) to a different laptop.
    BOth machines run 10.6. When using Time Machine it didn't want to know about it with the graphical restore.
    I tried the browsing via Finder and drag/drop onto the new machine's desktop and no joy - error messages.
    Finally, I used the command line and the even used sudo, but got this error:
    mv: Linwood College//10Bi SS/Global Terrorism/Rainbow warrior comic.comicdoc: Operation not permitted
    The command I used was:
    MacBook:Grad School sam$ sudo mv -f Linwood\ College/ ~/Desktop/
    I did enter my password too, which is an Admin account on the machine.
    Any suggestions on how I can recover these files? I'd really like to get them off the external hard drive before I give up and wipe it.
    Appreciate all help in advance.

    shanachienz wrote:
    Hi Guys,
    I'm trying to restore some files from a time machine backup from a DIFFERENT machine (i.e. browse other Time Machines) to a different laptop.
    BOth machines run 10.6. When using Time Machine it didn't want to know about it with the graphical restore.
    What does that mean? Did you get an error message? If so, what? If not, what happened?
    You should be able to restore to an "alternate location," per #16 in the Frequently Asked Questions *User Tip,* also at the top of this forum.

  • -bash: ulimit: open files: cannot modify limit: Operation not permitted

    Hi all,
    i´m preparing a linux 64bits environment to install Oracle 10g R2. I´m following the installation manual and there say that:
    Depending on the oracle user's default shell, make the following changes to the default shell startup file:
    For the Bourne, Bash, or Korn shell, add the following lines in the /etc/profile file (or the /etc/profile.local file on SUSE systems):
    if [ $USER = "oracle" ]; then
    if [ $SHELL = "/bin/ksh" ]; then
    ulimit -p 16384
    ulimit -n 65536
    else
    ulimit -u 16384 -n 65536
    fi
    fi
    Ok, I did it, so when execute the follow comand I get a error like this.
    tetis:/etc # su - oracle
    -bash: ulimit: open files: cannot modify limit: Operation not permitted
    oracle@tetis:~>
    Can anybody help me ?
    Regards,
    Wander (Brazil)

    The limits for -u and -n are defined in limits.conf, it looks like the -n section is not working (-u is already 16384), just to double check, show us the output for:
    $ more /etc/security/limits.conf | grep oracle
    oracle              soft    nproc   2047
    oracle              hard    nproc   16384
    oracle              soft    nofile  1024
    oracle              hard    nofile  65536
    $ more /etc/pam.d/login | grep pam_limits
    session    required     pam_limits.soEnrique

  • I was trying to kill an operation or process in my macbook pro 10.7.3 lion 2.8Ghz but it told me Operation not permitted

    well i was trying to kill the process that is preventing my macbook pro sleep firsst u do pmset -g asserations then find
    PreventSystemSleep                      1
       PreventUserIdleSystemSleep              1 so i can disable it and kill it but it tells me operation not permitted acan i get any help  please
    i really need my mac to sleep when i close its lid because its over heating

    I'm not 100% sure exactly what you're seeing. It sounds like one of your e-mail accounts is sending spam, and that this has gone on long enough (or been of sufficient volume) that this has landed you on some spam blacklists.
    It's extremely unlikely that this is due to malware on your Mac. There is no known malware for the Mac that uses your machine to send spam. On the other hand, it's highly likely that your e-mail account has been compromised, and is being used remotely to send spam. You need to change the password on that account right away. If you are also hosting a website on this same domain, I would be concerned that the hacker has also obtained access to your site. You'd be wise to change all passwords of any kind on your site, and get the site checked out by a web security professional.
    I also find it a bit disturbing that GoDaddy allowed the spam to go on unhindered long enough to land you on a spam blacklist. You may want to migrate to a higher-quality host at some point.

  • /bin/sh: bad interpreter: Operation not permitted error OS X Lion

    I am trying to install omnetpp-4.2.2 on OS X Lion. When I try to configure I get the following error msg:
    -bash: ./configure: /bin/sh: bad interpreter: Operation not permitted.
    Sudo ./configure didn't help. Highly appreciate your help.

    bad interpreter: Operation not...: Apple Support Communities

  • Delete tunnel "sit0" failed: Operation not permitted

    I tried to connect to Ipv6 through a 6to4 tunnel, but I couldn't and now I cannot delete the tunnel and I cannot connect to internet at all because all traffic is being redirected to the unusable tunnel.
    When I created the tunnel I ran the following code:
    # ip tunnel add 6to4 mode sit remote any local 192.168.43.68 (which was my address)
    I tried to flush and delete the tunnel and it deleted "6to4", but " sit0" remains. When I try to delete it, it says
    # ip tunnel del sit0
    delete tunnel "sit0" failed: Operation not permitted
    I did this as root, of course, and I need to delete it to get my Internet working again. Help please!
    Oh, and rebooting or modprobe -r sit has not resolved the problem because the interface remains and it doesn't show any webpage, although I can see that it shows connected.
    Is there any config file where tunnel configuration is saved so I could modify the file manually and reboot without it being active again?
    Last edited by kristian.tenorio (2015-01-17 14:02:15)

    I'm sorry. I actually had a DNS problem that I hadn't figured out. I still have not deleted the sit0 interface, but it's not giving me problems (it wasn't exactly the cause).

  • ShmDelete, Operation not permitted

    Hi,
    I have a problem on a Redhat Rel 4 system (SAP is 4.7x200, Kernel 6.40, 64-bit). It seems, that the work processes are not able to delete shared memory after the wp is not in use anymore. The error message is:
    <b>ERROR => ShmDelete(1002): shmctl(45350917,IPC_RMID,0) (1: Operation not permitted) [shmux.c      2969]</b> 
    I'm using the es/implementation=std.
    Does anyone has an idea, why shared memory can't be deleted?
    Thanks in advance
    Ulrike Tubbesing

    Hi Juan Carlos,
    the problem takes place during normal operation issues. We didn't change the kernel or os parameters. Since one an a half week we get messages from our monitoring toll, that the usage auf swapspace is higher than usually. By analysing this problem I sawto the error messages in the trace file of work procces.
    It seems, that the d+w processes also have shared memory segments, that belong to user root (not saposcol).
    Regards
    Ulrike Tubbesing

  • Mount.nfs: Operation not permitted

    I just install/reinstall nfs-utils and rpcbind on my pc, and I can't get rid of this error when trying to mount a nfs host:
    root# mount /mnt/metis/home
    mount.nfs: Operation not permitted
    fstab:
    metis:/home /mnt/metis/home defaults,noauto 1 1
    Any idea how to fix this ?
    thanks,
    Olivier
    Last edited by my64 (2010-01-08 10:26:17)

    I can confirm the problem and b) solution. Since I don't have access to the server I need to use version 3. Can be used from the command line with:
    mount.nfs share mount_point -o 'vers=3'
    or in /etc/fstab in a line like:
    share mount_point nfs vers=3 0 0
    When I use vers=3 in my fstab I get an error that the line is bad.  This is the exact line :
    FileServer:/media/Music/ /media/NFS_Music nfs vers=3 defaults 0 0
    Upon running mount -a, I get the error:
    [mntent]: line 18 in /etc/fstab is bad
    Where's my error?
    Thanks

Maybe you are looking for