No permission to write with dropdmg CLI

When I actually drop an app onto DropDMG, it generates a DMG file on the Desktop (alongside the .app bundle), but when I try to do it with dropdmg, I get

Error: You don’t have permission to save the file “Marked-3.0.0-1114.dmg” in the folder “Desktop”.

Why would this be? I’ve tried adding all kinds of things to Full Disk Access, including DropDMG, iTerm , the ruby that’s executing the script, and the dropdmg binary itself. Nothing seems to get me around this error (including trying other directories).

I think there must be some other difference there because the command-line tool just queues jobs with the main app. The same operation should work the same way no matter how you imitate it. It’s the permissions of the DropDMG app that matter.

You could try checking Always run with root access in the settings, though I wouldn’t expect that to be needed in this case. Is it only the Desktop folder that has this problem?

Do other formats like .zip or .tar work differently?

Also happens with zip, and with root access enabled. Happens saving to Desktop and to any TMPDIR.

You are continuing to see a difference with the command-line tool vs. the app itself?

Which version of macOS are you using?

Is there more information about the error in the detail drawer of the DropDMG window?

26.4 (25E246) (beta 4, maybe?)

Yes, it works fine when dropped, but not when called from the CLI.

Error message in drawer is the same as the command line:

You don’t have permission to save the file “Marked-3.0.0-1114.dmg.zip” in the folder “Desktop”. To view or change permissions, select the item in the Finder and choose File > Get Info.

-Brett

Using dropdmg to create files on the desktop works for me with macOS 26.4. There was an older beta where HFS+ was broken, but it looks to me like 25E246 is the release version.

I’m curious why it’s trying to create the file Marked-3.0.0-1114.dmg.zip because DropDMG does not apply .zip on top of .dmg. What is the exact dropdmg command that you’re using?

Ah, the .zip was just because I was testing with zip but the calling script was still creating a .dmg filename. When the config is just DMG zlib, it gets the .dmg filename right. I wonder if that’s where the problem is, though, somewhere in the script changing the filename.

The relevant call site is:

```
dmg_cmd = [

Shellwords.escape(drop_dmg),

‘–config-name’, Shellwords.escape(dmg_config),

‘-b’, Shellwords.escape(staging_dmg),

Shellwords.escape(target)

].join(’ ')
```

Huh, when I directly run what that command should output:

dropdmg --config-name “Marked 3” -b Marked3.0.01114.dmg ~/Desktop/Marked.app

It works fine. This must be something in my script. I’ll figure it out.

Solved it. My script was passing a full path to -b instead of just a filename. If I exclude the path and let the config place the result next to the app, it works fine. Sorry for the trouble!

1 Like

--base-name/-b is actually supposed to be the basename, i.e. just Marked3.0.01114 without the extension in your example.

You can specify the folder using --destination/-o if necessary.

Got it, thanks!