rockermm2

password protected folders

8 posts in this topic

I have ubuntu and i was wondering if i could make a local folder password propected

0

Share this post


Link to post
Share on other sites

What are you trying to prevent against? Linux is multi user, any files you have in your home directory should be inaccessible by any other user of the computer (except root of course).

If you have multiple people sharing the same account, thats another issue.

0

Share this post


Link to post
Share on other sites

Look into TrueCrypt

You won't be be password protecting a folder, per say. Instead, you'll be encrypting a partition, and mounting it to a folder. You use TrueCrypt to set up the encrypted partition, which you unlock with a password, and then you mount it to a folder.

Ex(note: you need root privileges... hence the use of sudo):

$ sudo truecrypt --create /dev/hdb1
... (you'll be asked set-up questions here) ...
$ sudo truecrypt /dev/hdb1 /mnt/secure_folder
$ cd /mnt/secure_folder

See http://www.linux.com/feature/59548 for more info.

OR, if you don't have a spare partition, you could always use the zip command to password protect an archive, which you can sort of treat like a folder.

$ zip -e secure_folder.zip my_folder/
Enter password:

The above example will create a password-protected archive named secure_folder.zip from the folder my_folder

0

Share this post


Link to post
Share on other sites

As someone above said, Linux is a multiuser Unix-like operating system.. and as such, several solutions exist for securing files in your home directory.

Personally, I make sure my important documents have safe file permissions.. stops snoopers in their tracks.

Example - An insecure file, readable by anyone..

-rw-r--r--   1 bsdfan  bsdfan   495K Apr  7 12:04 townhall.jpg

Translating the permissions block is easy, the first "rw" relates to the owners permissions, in this case, I have read/write access... and everyone else has "r"/read only permissions, the octal representation would be 0644.

If I wanted this file to be private, I have several options...

1) Change the permissions block to look like, -rw------- (mode 0600)... if it's a directory, execute permissions would be required. (mode 0700).

2) Encrypt the file using OpenSSL, AES-256-bit encryption with a 38 character memorized alpha-numeric pass phrase.

I do both... with a slighly longer passphrase. :P

Edited by BSDfan
0

Share this post


Link to post
Share on other sites

you can use the script called encryption.sh.txt on this page, below, it's very secure. all you do is right-click the directory you want to secure/encrypt and select scripts>encryption (or whatever you name the script)

http://rob.pectol.com/component/option,com...pper/Itemid,30/

the script works with thunar too.

http://ubuntuforums.org/showthread.php?t=108513

i mainly use truecrypt too, the new version has a gui, but i still use the old CLI version, you can set it up following irongeek's truecrypt tutorial, it's exactly the same setup for linux and windows.

Edited by iceni
0

Share this post


Link to post
Share on other sites

You could also try out 'EncFS' (encrypted file system using Fuse to 'mount' drive), and libpamencfs if you want to automount them on login.

Cheers,

Mungewell.

0

Share this post


Link to post
Share on other sites

I should have mentioned that you don't need root permissions for Encfs, just have to be a member of the FUSE group. You don't need to pre-allocate space (partition or 'fixed' container file); each of the encrypted files is stored as a separate file, this has the disadvantage of meta data leaks but means you don't tie up 'unused' disk space.

Another cool hack with EncFS is that it can be run in 'reverse' mode, where it presents an encrypted directory created 'on the fly' from a normal (unencrypted) directory, a neat/quick way to produce encrypted CDs/DVDs of non-encrypted data.

Munge.

0

Share this post


Link to post
Share on other sites
OR, if you don't have a spare partition, you could always use the zip command to password protect an archive, which you can sort of treat like a folder.

Zip 'password protection' (cough cough) is trival to break, so don't use it. A better method would be to encrypt the zip archive with a proper encryption program, you could use GnuPG for this (either public/private or shared key).

Cheers,

Mungewell.

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now