macOS Quarantine on Executable Files

When using BBEdit 12.6 or later on macOS 10.13 or later, you may find that after editing an executable file (such as a shell script, or any script with a #! line), you are unable to run the file using Terminal or any other application.

This is happening because of security measures in macOS. When the OS detects changes to an executable file on disk, it will under certain circumstances add a extended attribute to the file. The quarantine attribute subsequently prevents execution of the file.

To work around this, open BBEdit's Preferences window and select the Application prefs pane.

If the "Sandbox access" option says "not allowed", click the "Allow" button and follow the prompts as indicated to grant access to your Mac's boot drive.

Once you have done so, that should prevent the OS from applying any further quarantine flags to your files.

Additional details are available in our App Sandboxing technical note.