how to fix "Operation not permitted" when i use launchctl in macos catalina

I think the problem you have is not with Python, but with the file permissions on auto.py or the path leading up to it. What user account is used to run the script? Does that user have the necessary permissions on both those executables and the parent directory? Reason I suspect directory permissions is that ls is failing along with auto.py.

You might have some luck if you move everything out of /Users/gassy/Documents and to another location, perhaps under /opt or /var or similar, and then make sure that the permissions are sane. I know that macos treats some of those directores under /Users/<user> special, sometimes in a less-than-helpful way...


Finally figure it out...

It's a problem related to Catalina new permission system, the /bin/bash need to have the [full disk access].

enter image description here

Tags:

Python

Macos

Sh