How to modify an encrypted folder's capacity

Started by greg, August 14, 2009, 01:25:15 PM

Previous topic - Next topic

greg

When Espionage encrypts a folder, it uses the same technology that Apple's FileVault uses: encrypted disk images. These special files must be given a capacity upon creation, which determines how much data they can potentially hold.  The actual size of the disk image can change, and thus the disk image can grow in size on your hard drive, but it can only grow up to the capacity.

When Espionage encrypts a folder, it calculates the folder's capacity using a value called the Minimum Image Capacity (MIC) as defined in the Advanced preferences:

if 10 times the size of the folder is greater than the MIC
folder capacity = 10 times the size of the folder
otherwise,
folder capacity = MIC

By default, the MIC is 10GB.

The capacity can be changed, and a future version of Espionage will make this simple to do.

However, it is also possible to change it yourself, but it does involve the use of the Terminal.

Below are instructions for doing this that should be easy enough to follow, even if you've never heard of a "Terminal":

Verbose Instructions for Adjusting a Folder's Capacity

  • Open Espionage and select the folder you will resize
  • Uncheck its 'Enabled' checkbox and click 'Save Changes'
  • Open the Terminal application in /Applications/Utilities
  • Type (omit the quotes, note the extra space): 'cd '
  • Locate the folder you wish to resize, and drag it onto the Terminal window where you've typed 'cd' followed by a space
  • You should now have something that looks something like this in the terminal:

       [prompt]$ cd /Users/[your username]/path/to/folder
  • Press the 'enter' or 'return' key
  • Type 'ls -a'
  • You should see a listing of files, one of them will have a dot, followed by the folder name, followed by ".sparsebundle" or ".sparseimage". Copy this entire name (including the dot at the beginning)
  • Enter this into the terminal, where your see [paste], instead of typing [paste], press Apple+V to paste the file name you copied in step 9. Note that what you paste should be surrounded in double-quotes:

       hdiutil resize -size 10g "[paste]"
  • Do NOT press enter, use the arrow keys to position the cursor on top of the 'g' in '-size 10g', and press delete twice to delete the number 10. Enter the capacity you wish the folder to have (units are in gigabytes). So if you want  your folder to have a capacity of 250GB, then the final line will look like this (if your folder is called "Secret" and it's a sparseimage:

       hdiutil resize -size 250g ".Secret.sparseimage"
  • Press 'return' or 'enter'
  • Type in the folder's password when prompted for it. It will appear as though you are not typing anything, this is so that no one can see your password as you type it. Press 'enter' or 'return'.

In a future version of Espionage this will be handled in an easy-to-use interface.

Alternative Methods

If you are running out of space in an encrypted folder and would prefer an alternative method to the above instructions (with the current version), simply restore the folder by removing it from Espionage, and then re-encrypt it. You can also simply set the MIC to be a very large value, although that will only apply to folders you encrypt after modifying it.
Follow @espionageapp@twitter.com or @espionage@mstdn.io for news and updates!