-1

I am stuck trying to access this specific file from an App I have created with Automator. When the exact same Bash script is run from Terminal, all is dandy. I have checked permissions on the file and they are -rw-r--r--@ (which I recognize is quarantined) and then I remove the xattr so it becomes -rw-r--r--, however it does seem that the attribute does get reapplied at some point (not instantaneous).

The file path is the following:

~/Library/Caches/com.apple.findmy.fmipcore/Items.data: Operation not permitted

and the application I am creating is documented here on github https://github.com/jbobrow/DogWalker

As a quick recap of what I've tried: I tried changing the file permissions. I tried restarting after permission changes. I granted the application full access in System Settings. I tried removing the quarantine attribute from the file...

When the application is run in Automator or with the app, the file isn't accessed so the CSV simply gets a blank line with the date. When I run the same bash script in Terminal, the CSV populates as desired.

I look forward to a possible solution and will be thrilled to give credit in my README.md 😅

1
  • Does your script work if called from launchd? Do you really need Automator? Commented Jan 23, 2024 at 17:29

1 Answer 1

-2

Do you have selinux enabled? Find out by running getenforce. If it returns "Enforcing" then it could be what is blocking access to the file.

You can disable the enforcement with sudo setenforce 0. To confirm it isn't being enforced, just run getenforce again. It should return "Passive".

You can use sudo setenforce 1 to re-enable. Note these that changes are temporary in that upon next reboot it will go back to the default that is set in the /etc/sysconfig/selinux file.

If you find that selinux is enabled, Google search "how to diagnose selinux issues" for instructions on how to resolve issues.

Sign up to request clarification or add additional context in comments.

1 Comment

Since this is tagged “macos” I would assume no selinux

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.