Can't Figure Out Error: Read-Only File System. Macro Cancelled

I'm new to KM and could use some help with my first macro.

My macro is set up to execute a shell script with input from nothing. Here's the text script that KM is executing:
sh "/Users/MyUserName/Dropbox/Folder/"

The script is pretty straightforward:
1 #! /bin/bash
3 echo "Hello!" > test_output.txt

I can run this script successfully from my terminal.

However, I get an error like this when I execute the KM macro:
2020-08-04 08:56:09 Execute a Shell Script failed with script error: /Users/MyUserName/Dropbox/Folder/ line 3: test_output.txt: Read-only file system. Macro “MyMacro” cancelled (while executing Execute Shell Script).

I have a very similar error pattern. Did you ever figure this out?

Have you granted all the privileges it requires such as "Full Disk Access"?

I just tried granting Keyboard Maestro full disk access. That did not resolve the issue. :frowning:

When you say you can run it in Terminal do you mean the command line itself or the script file? If the latter did you make sure it's executable? To make it the one permissions must be -rwxr--r-- (executable by you, the current user).

Probably worth specifying the output folder.

It may, by default, be trying to write to the device root.

This, for example, is working fine here:


and this:


Reveals that until you specify the output folder, the default is indeed the system root, to which, if all is well, you will have no write access:

1 Like

Did you find any solution? I have the exact same issue [Errno 30] Read-only file system. I also have KM access to all permissions. Not many other threads out there to look for solutions...

Hey @adenosine,

Welcome to the forum!   :smile:

See Post #6 above.