How to Password Protect a File or Folder in Mac OS X

by Ken Burnside Google

    Password protecting a file or folder can help you meet one of the essential needs of a shared computing environment: keeping information away from prying eyes. Mac OS X doesn't offer a direct way to password protect individual files or folders; however, there is a workaround you can use that involves creating encrypted disk images.

    Step 1

    Click "Applications," then "Utilities," and then open up "Disk Utilities."

    Step 2

    Click on the "New Image" button. Depending on your Macintosh's security settings, you may be prompted to enter your administrator password to do this.

    Step 3

    Type the name of your new disk image in the Save As field. This is the name of the disk image file, which has the extension .dmg. You can also change where Mac OS saves the disk image at this step.

    Step 4

    Set the maximum size of the disk image in the Volume Size field. If your Macintosh has an optical drive, sizing the disk image to the same size as your recordable media allows you to back up your encrypted disk image.

    Step 5

    Select a volume format. This is effectively the file system used for the disk image. The default selection -- Mac OS Extended Filesystem -- offers a good selection of options. Other options allow you to access the volume from different operating systems if the password is entered.

    Step 6

    Select an image file format for the disk image. "Sparse disk image" gives an image that will only use the space it needs, and as you add files to the image it will grow on the disk. The "read/write disk image" choice uses more space on the disk, but doesn't expand when new data is put on the image.

    Step 7

    Select your encryption standard. 128-bit AES is the default, while 256-bit AES is available for Mac OS 10.5 and later, and is more secure.

    Step 8

    Click the "Create" button, then enter a password for your disk image when prompted. Be sure to write that password down somewhere, and uncheck the "add to keychain" checkbox to ensure that someone else using your computer doesn't have access to the disk image. Putting your password on the keychain allows someone with access to your computer to simply mount the image from a CD without having to enter the password.

    Step 9

    Click "OK."

    Step 10

    Copy the files you want to keep protected into the icon of the disk image. To access them later, command-click or right-click the icon, select "Mount" and enter the password when prompted.

    About the Author

    Ken Burnside has been writing freelance since 1990, contributing to publications as diverse as "Pyramid" and "Training & Simulations Journal." A Microsoft MVP in Excel, he holds a Bachelor of Arts in English from the University of Alaska. He won the Origins Award for Attack Vector: Tactical, a board game about space combat.

    Photo Credits

    • Justin Sullivan/Getty Images News/Getty Images