Ask OS X Daily: “How can I password protect a file?”

Hello all you loyal OS X Daily readers! Recently we have been receiving a large number of Mac OS X related questions in our inbox. Normally our staff would try and respond with an answer to the best of our knowledge. However, sometimes we get a question we absolutely do not know the answer to. We think it would be fun to run some of these by the many regulars who stop by the site. Please help us with the following question, and feel free to continue to email us with any Mac OS X related questions.


Greg Simon writes:

“First off, I’ve enjoyed the numerous tips and tricks posted by the knowledgeable folks at OS X Daily. I have something I think you guys might be able to help me with. Recently I found myself writing a journal, and as such I really want to find a way to password protect it so my inner thoughts don’t end up in the hands of the wrong person. Multiple people use my laptop and its not a good feeling knowing that anyone could just double click my text file of emotion and find out everything about me! All I’m looking for is a way to encrypt a file on a file-by-file basis, do you guys have any suggestions?”

Related Posts with Thumbnails

18 Comments

» Comments RSS Feed

  1. Hi there,
    you could write in Vim and encrypt the file via the :X command. Plain and simple.

  2. David says:

    OS X does have some encryption stuff in disk images..

    Thats not exactly on a file-by-file basis, but still – you could create a disk image at a certain size encrypt and password protect it and keep all your “secret” stuff there, and you wouldn’t have to look for 3rd party software to do the job ..

  3. Neil says:

    I have been using a dashboard widget “DashCrypt” to do this task. For most things it works well……

    http://www.dashboardwidgets.com/showcase/details.php?wid=588

  4. niclet says:

    Encrypted Disk Image is the best “native” way. Besides, I personally use Crypt (http://www.dekorte.com/projects/shareware/Crypt/) simple and tough.

  5. niclet says:

    Sorry, here’s the “live” link:
    http://www.dekorte.com/projects/shareware/Crypt/

  6. Dimitri says:

    As others have already suggested, I use an Encrypted Disk Image. It may not be exactly what you were looking for; however, it may be easier to have a single “my disk” which is encrypted.

  7. Vladimir says:

    great q

  8. Christopher says:

    I too have looked for a way to do this, but have not been able to find one. There really is no straight forward way to do this in OS X. I did find at one point, a third party app that let you set a password then would hide and unhide the files you told it too when you opened it and entered the password, but the program was poorly designed and did not function well. So here are a few simpler options.

    If your journal is typed in Microsoft Word of NeoOffice Writer, then you can save the document with a password. In Word click Options… in the save dialogue then enter a password there. In Writer, click Save As… then click the “Save with Password” checkbox. I do not know if that helps at all.

    Also, if you are not using a word file, or even if you are but wanted further protection, then you could change the file permissions either in “Get info” or from the terminal, so that it the file could only be read when you are signed in under your own username, or with root privileges. To do this, you would open the “Get Info Dialogue,” scroll down to Permissions, then change everything but “Owner” to “No Access.” You may need to enter your password at some point. However, this would only help if all the users of your laptop use different usernames and passwords.

    Finally, this will not password protect your file, but you could hide the file from prying eyes by opening the terminal, navigating to the directory in which your journal is stored, and renaming the file with a “.” before it. The command to rename is mv. For example:

    mv MyJournal.txt .MyJournal.txt

    would do the trick, obviously replacing “MyJournal.txt” with the name of your file. Then, just issue the reverse command to get it back when you would like to edit it:

    mv .MyJournal.txt MyJournal.txt

    You can also combine any or all of these three tricks for added security. Bear in mind that none of these methods actually encrypt your data, they just lock people out of it or hide it. For encryption, your best bet is the encrypted disk image mentioned above.

  9. Christopher says:

    Sorry. typo in the last post, poor proofreading. “Microsoft Word of NeoOffice” should read “Microsoft Word OR NeoOffice”

  10. Jim says:

    Just use OpenSSL like shown here: http://snippets.dzone.com/posts/show/341

  11. Andy says:

    Now here is an idea that i am just trying. Launch keychain access (in the utilities folder) Go to the File menu and then New Keychain name it give it a password (not your login password) and then right click on it when it shows up in the side bar click on Change Settings and make sure it is set to automatically lock. Now you can add a new secure note item and others cannot access it without your password.

  12. Jake says:

    Here is a widget that actually hides files and folders from both spotlight and finder. Just drag said file into the magic hat, add a password, and you are done. See this site for more details: http://www.dashboardwidgets.com/showcase/details.php?wid=1410

  13. [...] Read this… although a bit dated, has some good ideas. Ask OS X Daily: “How can I password protect a file?” – OS X Daily Regards. [...]

  14. Tori says:

    I found this really helpful! Thanks guys!!

  15. SS says:

    This is easy. Get Info on the file, uncheck Hide Extension, then close Get Info, and rename the file with a different extension. The system will ask if your sure?, say yes, you’re done.
    In your case, change .docx or whatever to .jpg or whatever. If people try to open the file, it wont work.
    With this method there’s no need to download widgets or programs. All you have to do is remember the original dot extension.

  16. SJ says:

    Comment to SS.. Your solution works great! Nothing extra to download. THANKS!

  17. DJ Steve says:

    I know this post is WAAAAY old but it comes up pretty early on via Google search. via YouTube I found out a great way to do this.. the program you download is called LameSecure (link below)

    http://mac.softpedia.com/progDownload/LameSecure-Download-27445.html

    I don’t know about y’all but this is EXACTLY what I was looking for. Set the password up using LameSecure, then it turns your file into a .app, requiring a password to open it up. Great app, kudos to those who created/developed

  18. what about a secure note in keychain?

Leave a Reply

 

Save big on Apple & Mac Deals from Amazon.com

Recent Comments

Shared on Facebook

Support Us

Mac Picks

iPhone & iPad Picks

Mac from PC Picks