Locking Folders?

bkaron

Yep, That's Me!
Can you lock an individual folder, so that no one could get into it, or see whats inside?
 
Yeah, use the Terminal: mv path/to/file_or_folder path/to/.file_or_folder

Notice the change: there is a period before the filename. This makes it invisible to the Finder. If you really want to make it un-openable too, I can show you that, but it's not really needed.
 
What dlloyd suggested will make the folder invisible to anyone that doesn't know their way around the terminal. A simple way of seeing that folder is to navigate to the enclosing folder and type "ls -la". This will show all files and folders, even the hidden and invisible ones. You can still access hidden/invisible folders the same as any other folder -- they just don't show up to novice users.

A better way would be to adjust the permission settings via the "Get Info" window and change the "Owner" to yourself with permissions of read and write, and change the "Group" and "Others" to "No Access." This will allow you to access the folder but no one else.
 
Highlight the folder, do a command+I (or go File->Get Info). Then go to Ownership & Permissions-Details and make it readable only for your account.

Now if you want to make the folder password protected (so if anyone is using your account) then you need a to use Disk Utility. Open Disk Utility and create a new Disk Image but password encrypt. There are third party programs for email like PGP.
 
Be warned, though, if you make the folder "read-only" for your account, you won't be able to do anything with it. You need to make it read/write for your account and read-only or no access for everyone else.
 
Two things, I need help, how do you use this mv path/to/file_or_folder path/to/.file_or_folder

If it works, can I use TinkerTool to see the file?
 
ElDiabloConCaca said:
Be warned, though, if you make the folder "read-only" for your account, you won't be able to do anything with it. You need to make it read/write for your account and read-only or no access for everyone else.

I change my folders to no access all the time and I can always change them back to read/write with no problems. I just use the get info button. :confused:
 
bkaron said:
Wow I like that, now I need help on hiding the folder

Well there is this and this. Plus, you can do it free with Terminal, just look at this. To do it start the command off: cp -r put a space in the drag the folder you want to hide to the terminal. Then put in another space a drag the folder to Terminal again, but this time put the dot (.) in front of name (the last part of the Terminal path name). Now you have a hidden copy of the folder you just copied. you can delete the shown one because you have a hidden one in the same location now. Just use TinkerTool (and show hidden files) and verify it is there (before you erase the original).
 
If you don't want people to see the contents of a folder, just make it a r/w disk image with password. That's secure enough for the occasional visitor not to be able to just look at things. Disk Utility is your helper.
 
Back
Top