How can I protect a folder in X?

mindbend

Registered
What are the options for password protecting just a folder and its contents in X? I don't want to protect each file per se, I just want to make a given folder protected so that nobody can open it without entering a password.

Thanks for any tips.
 
Use the UNIX under-pinnings to do this:

If you want a file to only be accessible by one user, you use:
chown user foldername
to assign that folder to that owner, then restrict access using the
chmod 700 foldername
command. Of course, you can achieve a lot of this by calling up a file's info and just setting it so that other people no longer have access to it under the privileges tab.
I once had a folder that I assigned a chmod 000 (meaning nobody could access it, not even the user) and then used su (super-user) commands to bring it up if I needed it.
Another option is to use chown root filename after locking down all the privs, so that you'll have to chown it back to your own username to use it.

The vital thing is to make sure that no-body else has administrator privileges, as they will be able to access anything from anywhere, as long as they know the right commands.

You can also keep a file in your root directory hidden by adding its name to the /.hidden file. Then, you can call it up with Apple-~ in Finder, enter its name, and Voila! Make sure you clear this out afterward, as someone might stumble across it.

And be careful. If you're not sure what I just said means, just stick to using the privs menu in the file-info box, and make sure no-one else has Admin access.
 
I wanted this also, so much that I started learning cocoa so I could build an app that does something similar .. hopefully someone that knows cocoa better is working on one now...
 
You can also create a disk image in Disk Copy and select encryption for it; hence, anything in that image is unavailable unless first mounted with the right passphrase.
 
Yes, an encrypted image is a damn good way to keep certain files protected, and best yet, you won't need to wrap your head around any weird commands. Good thinking BLB!
 
www.apimac.com

"Apimac Secret Folder lets you conceal a folder and its contents. It provides you with an easy and fast way to protect documents and avoid them being seen, modified, or erased by other users (either on a network or uninvited!). The application is really simple to use and can be protected with a password for extra security."

hope this helps
 
Thanks for all the tips. I"m going to start with this apimac site as it sounds much easier than the Unix solutions, as good as they are. I'm just too afraid to go through the terminal quite yet. I know it's very powerul, but I need simple, graphical solutions for my pea brain.
 
Secret Folder sounded great, but in reality it doesn't do what I want. Am I missing something? It seems you can only password protect the application itself, not the folder you are protecting. Also, I don't want to make the folder invisible, I just want it "locked" or unopenable. I find it odd that it is left out of the OS as a basic protection system. I'd like to see the "lock" feature under Show Info step up a notch with "lock with password" or something. I forget how the old encrypting system worked. Did it simply encrypt the files/folders or did it compress them like a Stuffit archive with a password? I wouldn't want to compress them. I'll start playing around with permissions I guess, but the problem is that the folder I want protected is on a public machine. Man, I need to learn this stuff better.
 
The problem, with Mac OS X, is that you can set all the security that you want on folders, files, etc..., but there is one simple way to open and read all those folders and files : Mac OS 9... So, the only way to protect your datas is to use a disk image protected with a password. PGP should be better, but I don't think there is a carbon version yet.
 
Back
Top