LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 10-06-2004, 06:29 AM   #1
sirpelidor
Member
 
Registered: Oct 2003
Location: Madison
Distribution: mdk 8.2, 9.0, 9.2, slack 9.1
Posts: 403

Rep: Reputation: 30
how to password protect certain directories?


Hi, there's 1 or 2 directory I'd like to put password for it.

so if anyone want to cd into that dir, they (or i ) need to type a password for it, and suggestion how it can be done?

i read the security programming from the HOWTO, didn't understand much (it talked a lot about buffer overflow..etc) :P

btw, this is only 1 machine, so samba is not nesscary

p.s: i do not want to open a new user acct, because even without write permission, you will still able to ls and cd into other user's home dir. all i want is a folder with password protection

thank you
 
Old 10-06-2004, 06:48 AM   #2
Frustin
Member
 
Registered: May 2002
Location: Essex, UK
Distribution: Debian, Redhat, AIX 5L
Posts: 512

Rep: Reputation: 30
why dont you just own them and dont allow anyone else to read apart from owner?
 
Old 10-06-2004, 08:04 AM   #3
320mb
Senior Member
 
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577

Rep: Reputation: 48
have you ever noticed that regular users CANNOT cd into root directory??
create a 'new group' put those 1 or 2 files into the 'new group' and make whatever user part of the 'new group' and only that user will have access to the files...........no need to password them, just change the ownership and permissions.........ta da......easy
 
Old 10-06-2004, 01:16 PM   #4
gensis
LQ Newbie
 
Registered: Jun 2004
Distribution: Slackware, Suse, Red Hat, Fedora
Posts: 28

Rep: Reputation: 15
U can use the standard linux filesystem permissions to lock the users out.
Use two commands
Chmod < changes file permissions.
Chown < changes the owner of the file or directory


I hope that helped.
 
  


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
Password protect souvik Programming 3 11-06-2015 02:35 PM
Password Protect Folder?? sall Linux - Software 5 07-18-2005 07:58 AM
Password protect a website J_K9 Programming 5 07-07-2005 09:12 AM
Password protect a directory Stephanie Linux - General 6 03-26-2002 03:58 PM
protect directories in apache Syncrm Linux - General 9 03-19-2002 12:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 06:36 PM.

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
Open Source Consulting | Domain Registration