Not enough space in dmg file

2

I created a password protected dmg file (http://www.hongkiat.com/blog/encrypt-mac-folder/) but when I try to add content to the mounted dmg file I receive a 'not enough space' message. I have enough space.. don't know what wrong. How to fix this issue?

user1452062

Posted 2014-02-01T10:27:26.600

Reputation: 161

Answers

4

I’m not 100% certain what’s going on, but I suspect you need to empty your trash while the DMG is mounted.

OS X stores the trash in a hidden directory in the root of each mounted drive. If you drag files from the mounted DMG to the trash, they won’t actually be deleted; they’ll remain in that hidden directory (inside the DMG) and take up additional space. If you empty your trash, that will delete the hidden directory, and you’ll be able to store more data in the encrypted DMG.

Benjamin Barenblat

Posted 2014-02-01T10:27:26.600

Reputation: 533

This could be the problem, but only if there are deleted items in the trash. The real answer is to increase the size of the image with the hdiutil command (see other answer on this thread for details) – Phil Windley – 2015-04-15T02:08:59.127

4

I found the answer for my question:

hdiutil resize -size 80m

You can use G instead of M to specify the value in gigabytes.

user1452062

Posted 2014-02-01T10:27:26.600

Reputation: 161

This is the right answer. The only thing to add is that you have to specify the path to the image file after the size. – Phil Windley – 2015-04-15T02:07:14.000