Jump to content

Recommended Posts

Posted

<div class="KonaBody"><p><img src="http://osxdaily.com/wp-content/uploads/2012/01/zip-password.jpg" alt="Zip Password in Mac OS X" title="zip-password" width="620" height="234" class="aligncenter size-full wp-image-25713" /></p>

<p>Creating a password protected zip file is easy in <a href="http://osxdaily.com/category/mac-os-x/">Mac OS X</a> and does not require any add-ons or downloads. Instead, use the zip utility that is bundled with all Macs.</p>

<p>If you’re familiar with the <a href="http://osxdaily.com/category/command-line/">command line</a>, the syntax of the encrypted zip command is as follows:

<code>zip -e [archive] [file]</code></p>

<p>If you’re not sure how to use that, read on to learn how to create zip archives encrypted with passwords. These encrypted zip files will maintain password protection across platforms, meaning you can send a protected zip file to a Windows user and they will still need to enter the password in order to view the contents.</p>

<h2 style="font-size:1.3em;">Set a Zip Password in Mac OS X</h2>

<p>You can create password protected archives of files and folders:</p>

<ol>

<li>Launch the Terminal from the Applications > Utilities folder</li>

<li>Type the following command:</li>

<p><code>zip -e archivename.zip filetoprotect.txt</code></p>

<li>Enter and verify the password – don’t forget this</li>

</ol>

<p>The resulting archive, in this case named “archivename.zip”, is now encrypted with the password provided. The file that was encrypted, “filetoprotect.txt”, is now inaccessible without entering that password. </p>

<p><strong>Example: Zipping a Folder and Setting a Password</strong>

Here is an example of what this will look like from the command line, in this case we are compressing and password protecting the entire ‘Confidential’ folder located within the users /Documents directory, and the password protected zip is being placed on the users desktop for easy access:

<code>$ zip -e ~/Desktop/encrypted.zip ~/Documents/Confidential/

Enter password:

Verify password:

adding: ~/Documents/Confidential/ (deflated 13%)</code></p>

<p>Notice the password will not display, this is normal behavior for the Terminal.</p>

<h2 style="font-size:1.2em;">Opening the Password Protected Zip</h2>

<p>Despite being created at the command line, you do not need to unzip the file from the terminal, it can be expanded from the Mac OS X Finder or within Windows using standard unzipping apps. Just double click on the file, enter the password, and it will decompress.</p>

<p>Here are some use cases for password protected zip archives: </p>

<ul>

<li>Password protecting an individual file or directory</li>

<li>Sending a sensitive and encrypted file over an unencrypted network</li>

<li>Emailing confidential data to a Windows user</li>

<li>Adding an additional layer of security to a <a href="http://osxdaily.com/2012/01/06/hide-folders-mac/">hidden folder</a></li>

<li>Password protecting your own backups, outside of Time Machine</li>

</ul>

<p>While this can provide some protection on a per-file or folder basis, it’s always a good idea to <a href="http://osxdaily.com/2011/01/21/password-protect-mac/">password protect the Mac in general</a> with a login requirement on system boot, wake from sleep, and waking from the screen saver.</p>

</div>

<p><a href="http://feedads.g.doubleclick.net/~a/4oR88bHiDxcy4b2va8NcJKPvUGo/0/da"><img src="http://feedads.g.doubleclick.net/~a/4oR88bHiDxcy4b2va8NcJKPvUGo/0/di" border="0" ismap="true"></img></a><br/>

<a href="http://feedads.g.doubleclick.net/~a/4oR88bHiDxcy4b2va8NcJKPvUGo/1/da"><img src="http://feedads.g.doubleclick.net/~a/4oR88bHiDxcy4b2va8NcJKPvUGo/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">

<a href="http://feeds.feedburner.com/~ff/osxdaily?a=tDw1VDPIMrU:XYhe_aU_06Q:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/osxdaily?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/osxdaily?a=tDw1VDPIMrU:XYhe_aU_06Q:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/osxdaily?i=tDw1VDPIMrU:XYhe_aU_06Q:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/osxdaily?a=tDw1VDPIMrU:XYhe_aU_06Q:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/osxdaily?i=tDw1VDPIMrU:XYhe_aU_06Q:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/osxdaily?a=tDw1VDPIMrU:XYhe_aU_06Q:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/osxdaily?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/osxdaily?a=tDw1VDPIMrU:XYhe_aU_06Q:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/osxdaily?d=qj6IDK7rITs" border="0"></img></a>

</div><img src="http://feeds.feedburner.com/~r/osxdaily/~4/tDw1VDPIMrU" height="1" width="1"/>

 

View the full article

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days


×
×
  • Create New...