Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Shortcuts Operation not permitted

I wrote a Shortcut with a Run Shell Script action. It works fine when I invoke it from within the Shortcuts app, but when I invoke it from the menu bar, it gives me "Run Shell Script finished with an error" and "Operation not permitted". How do I fix this?

MacBook Pro 16″

Posted on Oct 17, 2023 8:06 AM

Reply
Question marked as Best reply

Posted on Oct 29, 2023 3:35 PM

I just found out how to solve this issue if you like me tried to run this from the Finder's Quick Actions.


The reason why you get this error is because Finder the app itself has no permissions to access certain folder or even the entire full disk. To fix this, you can follow the following steps:


  1. Open Settings > Privacy & Security > Full Disk Access (or files and folders)
  2. Toggle the Finder app on, or if you can't find it, click on the "+" button and add it


The Finder app should be in the following location:

/System/Library/CoreServices/Finder.app

I hope this helps!


Similar questions

7 replies
Question marked as Best reply

Oct 29, 2023 3:35 PM in response to Ken Nellis

I just found out how to solve this issue if you like me tried to run this from the Finder's Quick Actions.


The reason why you get this error is because Finder the app itself has no permissions to access certain folder or even the entire full disk. To fix this, you can follow the following steps:


  1. Open Settings > Privacy & Security > Full Disk Access (or files and folders)
  2. Toggle the Finder app on, or if you can't find it, click on the "+" button and add it


The Finder app should be in the following location:

/System/Library/CoreServices/Finder.app

I hope this helps!


Nov 1, 2023 10:47 AM in response to PhoenixHimself

Glad this works for some, but not for me. I don't see my shortcut showing up in Quick Actions, but instead in Services. I select some text, right-click on it, and select my shortcut from the Services menu. (It isn't showing in Quick Actions despite Use as Quick Action and Finder both checked. My shortcut's first action is Receive Text input from Quick Actions, which is working, and which then passes the text to Run Shell Script where I get the permissions error complaining that it can't run my shell script, but if I run the shortcut from within the Shortcuts app, it works fine. Have upgraded to Sonoma 14.1, but this didn't fix the problem.

Feb 27, 2024 1:25 AM in response to Ken Nellis

Some users seem to have solved the problem by granting Full Disk Access to Finder, but that approach did not work for me. However, I managed to resolve the issue by trying various methods. What I did was update the version of Python 3 installed in /usr/local/bin/ to the latest one and then added the updated Python 3 to the PATH environment variable. The update was performed using a package from the official website. During this process, I removed the symbolic link in /usr/local/bin/python3, which caused the Universal Clipboard function to stop working, so I suspect it is somehow related to Finder as well. I'm not certain if this was the correct approach, but I hope sharing this might help others.


Feb 27, 2024 3:24 AM in response to takashi_m

I was greatly mistaken.

Please make sure you have a directory that is not Operation not permitted. I have had it work fine in the home directory.

Create a new directory in that directory and then create an alias.

In that folder, I think you can access it from the shortcut app in the menubar normally.

As a side note, I think that the permission setting of the staff may be irrelevant, because even from a directory with drwxr-xr-x@, Operation not permitted may still occur.

Shortcuts Operation not permitted

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.