- Joined
- Oct 10, 2009
- Messages
- 48
- Reaction score
- 0
- Points
- 6
- Location
- Boston, MA
- Your Mac's Specs
- 27" iMac, 17" MBP, Mini x2
Hi folks,
I have a handful of shell scripts that I use to rsync a webserver that I run. Nothing fancy, just a one-liner in each of them. An example would be:
!/bin/bash
rsync -av /volumes/Macintosh\ HD/Users/me/Folder /volumes/Backup-Drive/Folder
The scripts run just fine if I copy/paste the rsync line into a command prompt, and all but one of them runs with a single click if I rename the files to .command so that they'll spawn on their own.
One of them, however, gives me an "operation not permitted" error:
I'm not entirely sure why. I've tried recreating the file, chmod 777 and +x, and for some reason just this one script refuses to run. If I paste the contents of the file into a terminal window, it executes just fine.
Anyone run into this? What am I missing? I've tried it with a !/bin/sh and a #!/bin/sh in front of it, and without the bash call altogether - same error.
Thanks!
I have a handful of shell scripts that I use to rsync a webserver that I run. Nothing fancy, just a one-liner in each of them. An example would be:
!/bin/bash
rsync -av /volumes/Macintosh\ HD/Users/me/Folder /volumes/Backup-Drive/Folder
The scripts run just fine if I copy/paste the rsync line into a command prompt, and all but one of them runs with a single click if I rename the files to .command so that they'll spawn on their own.
One of them, however, gives me an "operation not permitted" error:
-bash: /Users/me/Scripts/script.command: Operation not permitted
logout
[Process completed]
I'm not entirely sure why. I've tried recreating the file, chmod 777 and +x, and for some reason just this one script refuses to run. If I paste the contents of the file into a terminal window, it executes just fine.
Anyone run into this? What am I missing? I've tried it with a !/bin/sh and a #!/bin/sh in front of it, and without the bash call altogether - same error.
Thanks!