LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Is it possible to password protect a folder/file . I don't want to encrypt it (http://www.linuxquestions.org/questions/linux-software-2/is-it-possible-to-password-protect-a-folder-file-i-dont-want-to-encrypt-it-932313/)

karanace 03-02-2012 05:01 AM

Is it possible to password protect a folder/file . I don't want to encrypt it
 
I am a engineering student and i am trying to build a folder locking application for linux . My target is to create a application similar to window folder lockers.

Please Help.........
Desperately waiting for your suggestions

coralfang 03-02-2012 06:17 AM

You can change the folder's permissions so no user other than root can access the files inside:
Code:

# chmod 600 /path/to/folder
Then set the owner as root (if not already).
Code:

# chown root:root /path/to/folder
This will set your folder so that all user accounts on the local machine are denied access to the folders contents, except for the root account.

I'm not sure what you mean by password protecting a folder without encrypting it. There wouldn't be much point of "protecting" a folder with a password if it is not going to be encrypted in some way or another, assuming all accounts on the system have read access to the folder.

vikas027 03-02-2012 06:42 AM

Quote:

Originally Posted by karanace (Post 4616714)
I am a engineering student and i am trying to build a folder locking application for linux . My target is to create a application similar to window folder lockers.

Please Help.........
Desperately waiting for your suggestions

Hi Karan,

You can use zip I guess.

Quote:

zip -re folder.zip folder (it will ask for a password twice to encrypt))

unzip folder.zip(it will ask for a password to decrypt)


All times are GMT -5. The time now is 11:15 AM.