Industry guru Dave Taylor offers free tech support on a wide variety of technical and business topics, including HTML, online advertising, Cascading Style Sheets, Web design, management, Unix, Linux, search engine optimization, online dating, Mac OS X, shell script programming and Microsoft Windows.

How can I protect private folders on my Mac?

My sister and I share a Mac computer and I'm tired of her looking at my files. Is there some way I can protect or hide my folders without downloading any software she'd notice?


Dave's Answer:

Seems to me that the very best possible solution is for you and your sister to set up different accounts on your Mac, actually. That's one of the real benefits of Mac OS X (and, for that matter, Windows too).

You can do that by simply going to Apple --> System Preferences... --> Accounts and setting up an account for her. Then simply ensure that you log out when you're done with the computer each time and she won't be able to get to any of your files and you'll be safe from having her mess with your preferences, settings, etc.

No? That's not what you want to do?

Okay, I'll give you a couple of neat Terminal tricks that can help you out, one that lets you make a folder closed to everyone and another that makes it disappear completely until you make it reappear.

In both cases, you'll need to launch Applications --> Utilities --> Terminal.app. It'll start out in your account "home" directory, which you can check by typing pwd. Move to the directory where your folder or files lives by typing in cd followed by the name of the directory.

For example, if I wanted to protect a folder on the Desktop, then I'd type in cd Desktop and move there.

Now, to make a folder completely locked and unreadable, simply type in:

$ chmod 000 my-protected-folder

You won't get any feedback but you'll end up with something like this (pay particular attention to the "testing123" folder and how it's portrayed):

Folder protected / locked in Mac OS X

To get back in when you want to, simply go back to the same place with the "cd" command and type in:

$ chmod 775 my-protected-folder

To hide a folder or file completely, simply preface its name with a ".". For example, to hide "testing123" I'd rename it ".testing123":

$ mv testing123 ".testing123"

Wanna get that one back to normal? Go back to the same directory and type in the reverse: mv .testing123 testing123

So there you go, three possible solutions to your problem. Hope one of them works out for you!



Help others find this article at Del.icio.us, Digg, Netscape, Reddit, and Stumble Upon    

Subscribe!

Never miss another useful Q&A article again! Subscribe to AskDaveTaylor with Google Reader.

Comments

I have a suggestion: what about using Disk Utility to make an encrypted disk image (just make the initial image with enough head room to accommodate the folder growing to a big size later) and password protect it.

Opening (mounting) the image would require a password each time you want to open (read from or write files to the folder). Remember to eject the image once you're done using it.

While this seems simpler for the novice user than using the terminal it would be pretty obvious to other users, or your sister in this case. But if you put the image in a place that was a little out of the way she might just mistake it for something that belongs to the system.

Just an idea..

Posted by: Jayce at February 4, 2008 10:01 PM

I didn't understand
someone explain me what to do again?

Posted by: Hilda Oquendo at August 18, 2008 12:56 AM

Hi,
We just updated to Panther and now have a dual system that can handle either mac or windows.

I now have something that has appeared "On My Mac" that contains all the folders I've created to store information.

Unfortunately I do no have the ability to add any additional "Folders" as I was able to do prior.

Can you explain what has happened and if I can fix this?

Thank you,
Natalie

Posted by: Natalie at October 4, 2008 7:11 PM

how can i protect my video cd(.dat) from burn/copy? i wanna lock it

Posted by: kurt cobain at November 26, 2008 4:00 AM

how can i protect my video cd(.dat) from burn/copy? i wanna lock it

Posted by: kurt cobain at November 26, 2008 4:06 AM

I have a lot to say, but ...
Starbucks coffee cup I have a lot to say, and questions of my own for that matter, but most of all I'd like to say thank you for all your efforts on this Web site by buying you a chai!

I do have a comment, now that you mention it!









Remember personal info?


Please note that I will never send you any unsolicited commercial email. Ever.

While I'm at it, please note that by submitting a question or comment you're agreeing to my terms of service, which are: you relinquish any subsequent rights of ownership to your material by submitting it on this site.









Uniblue: Free Virus Scan

Search
Find just the answers you seek from among our 2000+ free tech support articles by using our Lijit search engine.


Help!





Subscribe to
Ask Dave Taylor!

Add to Google Reader
Add to My Yahoo!
Subscribe in NewsGator Online

RDF   XML

Free Updates!
Sign up and get free weekly updates and special offers on books, seminars, workshops and more.


Recent Entries
Join the List!
Join my author info mailing list, where you'll learn about my upcoming books, speaking gigs, and more!


Book Links
© 2002 - 2009 by Dave Taylor. All Rights Reserved.

Note: This web site is for the purpose of disseminating information for educational purposes, free of charge, for the benefit of all visitors. We take great care to provide quality information. However, we do not guarantee, and accept no legal liability whatsoever arising from or connected to, the accuracy, reliability, currency or completeness of any material contained on this web site or on any linked site.

[whiteboard marker tray]
"Ask Dave Taylor®" is a registered trademark of Intuitive Systems, LLC.