File password.

Hello,

Is there a way to protect a file with password
on opening the file.

Thank You

I dunt think so. (Might be wrong) but i never came on setting a password protect a file. Unless the only thing you can do is play around or set the file permission.

read - r
write - w
execute - x

or changemode chmod a file. chmod - changes file access permissions.

SYNOPSIS
$ chmod 777 <filename>

try man chmod
or info chmod..

chmod [OPTION]... MODE[,MODE]... FILE...
chmod [OPTION]... OCTAL_MODE FILE...
chmod [OPTION]... --reference=RFILE FILE...

Do post back..

Also, you could encrypt, or otherwise scramble the file. Depending on your Unix, you may have the "crypt" command installed, or something that could do what you want (PGP, GnuPG, BestCrypt, etc..). Warning: the learning curve gets steeper depending on what features you need / want, but in some cases, it's more than worth it.
I currently use GnuPG and BestCrypt. GnuPG is used for email and other small text snippets, while BestCrypt is used for secure file storage - It's a good idea, and farily straight forward: You create a data container of a given size, install the special device drivers, and mount it as a live filesystem. Just make sure you unmount it on your way out, otherwise it's not too useful, right?

killerserv, LivinFree

I knew to use chmod as one option and
crypt works well for me...

Thank you for your help,
-Satish
:slight_smile: