I know this may stem from a fundamental misunderstanding of the way disk images are intended to work, but even when full permissions are granted on a .dmg file, I am unable to add or remove files on the mounted disk image. Is there any way (natively or via a 3rd-party tool) to do this?

I know that when a disk image is mounted, a checksum verification is done, so I'm guessing that because modifying the image at all would destroy the checksum, this is inherently not allowed, but I'm wondering if there's a utility that could re-image the disk with a subset of its contents, perhaps recalculating the checksum in the process.

NOTE: Copying all the contents over, deleting, and then re-imaging is not a plausible option, due to the size of the image and the fact that it already fills most of the available space of the external drive on which it resides.

  • 1
    If you can't delete something it's probably because the .dmg file is read-only. In at Terminal, hdiutil imageinfo filename and look at the output for: Format: UDRO – user3439894 Feb 18 '16 at 23:11

A disk image is designated as read-only or read-write when it is created. Simply changing the permissions on the DMG file will have no effect.

Here is one purported solution that I have not tried myself, that uses the hdiutil convert command to make a disk image writable, and hdiutil resize to add extra space if required for any additional content.

  • Is this safe or does Apple expect them to be readonly? – Pacerier Feb 22 '18 at 0:13
  • @Pacerier it is irrelevant. While your DMG is mounted, your data has vulnerability level X. This X is the same if you write files in DMG and re-encrypt it and if you only read files by decrypting using the same key that you enter once in both cases. Keep in mind that while disk is mounted, readonly or not, it can be accessed by any software like normal folder. The only risk with writable DMGs i see is that they potentially can get corrupted in rare cases. – Croll Nov 16 '18 at 0:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .