How to modify an encrypted folder's capacity

Usage tips, tutorials, and information on using Espionage with various third-party programs.

How to modify an encrypted folder's capacity

Postby greg » Fri Aug 14, 2009 8:25 pm

One point of interest that currently isn't discussed much in Espionage's manual is the notion of folder capacity.

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:

Code: Select all
   if 10 times the size of the folder is less 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

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

    Code: Select all
    [prompt]$ cd /Users/[your username]/path/to/folder

  7. Press the 'enter' or 'return' key
  8. Type 'ls -a'
  9. 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)
  10. 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:

    Code: Select all
    hdiutil resize -size 10g "[paste]"

  11. 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:

    Code: Select all
    hdiutil resize -size 250g ".Secret.sparseimage"

  12. Press 'return' or 'enter'
  13. 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.
greg
 
Posts: 190
Joined: Thu Apr 02, 2009 3:14 am
Location: Tao Effect

Return to Espionage Tips

Who is online

Users browsing this forum: No registered users and 1 guest

cron