LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-22-2009, 05:32 AM   #1
thangappan
Member
 
Registered: May 2009
Posts: 52

Rep: Reputation: 16
setting the password for directory


Dear all,

I am working on debian operating system.My requirement is to set a password
for particular directory.

This directory might be opened in GUI or using cd command.
Is it possible to set a password for directory?

Whenever I opened the directory it needs to ask the password.It should say error unless the password is right.

Please help me........
 
Old 08-22-2009, 05:47 AM   #2
kofucii
Member
 
Registered: May 2007
Location: Bulgaria
Distribution: Slackware, SCO Unix
Posts: 62

Rep: Reputation: 20
No. there is no way to sat password for directory. You can chmod permissions, or use encryption:
http://www.debian-administration.org/articles/469
 
Old 08-22-2009, 05:48 AM   #3
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Try access control lists instead as there isnt really a ready made password manager for folders

Last edited by centosboy; 08-26-2009 at 03:31 AM.
 
Old 08-22-2009, 08:33 AM   #4
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,615

Rep: Reputation: 441Reputation: 441Reputation: 441Reputation: 441Reputation: 441
thangappan,

It doesn't mean Linux is not capable of encrypting or pad-locking the files, it is equally capable of doing that, only, Linux views passwording a file as NOT NECESSARY anymore because the owner of the file has absolute power to SET PERMISSION CONTROL IN EVERY FILE.

a) To have a file ONLY accessible by the owner (you) do this:

user@host--$: chmod 0700 /folder/file-name
-----------x

b) If you want a group of chosen users to have access to the file you need to do it in two (2) steps, to wit:

Step 1 - Create a group of users. Do this using your GUI Users/Group applet. Then, in the same applet make the privileged/chosen users to become members of that group (you may need root password to change the /etc/passwd file;
Step 2 - Set the file or folder permission to be accessible only by that group. Use one of those user(s) account when you create the folder or file, then set the folder permissions, in terminal do this:

user@host--$ chmod -R 0750 /folder_name

This will set also all files and sub-directories within it to similar permissions. The privileged member users to the same group of the one who created it will access the file without need of password.
-----------x

If you need something more than this you can use secure socket layer or gnu's gpg, you may learn about it by reading here, and here, or you can download a third party encryptor click here.
-----------x

Hope this helps.

Good luck.

Last edited by malekmustaq; 08-22-2009 at 08:39 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Username & Password Sync Fedora Directory and Microsoft Active Directory karnac01 Fedora 4 07-19-2010 01:51 AM
Password protect a directory aquatux SUSE / openSUSE 6 08-02-2005 12:56 AM
Password protecting a directory? How? Thrifty Linux - Security 7 07-20-2004 09:25 PM
Directory password protection scootz6 Linux - Security 2 03-25-2004 03:04 PM
password a directory help DigiCrime Linux - Security 2 03-05-2003 09:48 AM


All times are GMT -5. The time now is 02:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration