LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 06-03-2006, 12:06 PM   #1
Freestone
Member
 
Registered: Jan 2003
Location: Brighton, Michigan
Distribution: FC5
Posts: 114

Rep: Reputation: 15
Password protecting a directory possible?


Hello LQ,

I'm wondering if its possible to password protect a directory.
I have a directory: /home/bob/scripts
I realize I can change permissions on this directory and I have done that 'chmod 700 /home/bob/scripts' did the trick, so becoming root allows me access to the directory and no other users, including bob. That works fine but I would like to make it so a password is required to access that dir. Is there a way to do that other than becoming root to access it?

Thanks to all you wizards out there.
 
Old 06-03-2006, 04:33 PM   #2
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
The obvious route is gpg encryption see - http://www.gnupg.org/documentation/ If you use kde then the facility is available under Utilities.
 
Old 06-06-2006, 10:23 AM   #3
Freestone
Member
 
Registered: Jan 2003
Location: Brighton, Michigan
Distribution: FC5
Posts: 114

Original Poster
Rep: Reputation: 15
TigerOC replied:

Quote:
The obvious route is gpg encryption see - http://www.gnupg.org/documentation/ If you use kde then the facility is available under Utilities.
__________________
Registered Linux User #349859

Hmmm...
TigerOC, if it was that obvious, do you think I would post a question in here? Thats why I posted in Linux 'NEWBIE'!

Sheesh.
 
Old 06-06-2006, 10:51 AM   #4
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
Freestone - I would recommend that you not jump on people that try to help you. You will get more willing help if you do not. I imagine what "obvious" meant is that if you had tried a search of the forums, with the search string "password protect directory", then you would have found some good info.

I will assume you're just having a rough day, and I'll try to offer you some more tips. One thing you might investigate is TrueCrypt. This creates an encrypted container (a file or partition or disk), and you can mount this container as a directory structure. A password is required to mount the container.

There is not much you can do to keep root out of your files, by way of file permissions and such, if that was your plan. Encryption can make things quite difficult for root, but not impossible, if you're being watched and observed by a good sysadmin WHILE you're doing your decrypting. An encrypted file is safe enough (given good encryption), but once you decrypt the thing into memory - root can get at it. It's work, but it can be done.

You can also investigate a password protected zip file. Or gpg, as was already mentioned.
 
Old 06-06-2006, 12:22 PM   #5
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 60
adding to haertig, i dont think he was being rude or trying to be by using 'obvious'. i think he was trying to say, besides the previous search tactic, that there are many ways to do this, and since you use KDE then the software to do it should already be availble on your system and thats the quickest and best solution right now.
 
Old 06-06-2006, 02:51 PM   #6
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
Quote:
Originally Posted by Freestone
TigerOC replied:Hmmm... TigerOC, if it was that obvious, do you think I would post a question in here? Thats why I posted in Linux 'NEWBIE'! Sheesh.
Hmmm... a newbie and ironic too. Should make your presence in the forums interesting. Your original statement and question;
Quote:
I realize I can change permissions on this directory and I have done that 'chmod 700 /home/bob/scripts' did the trick, so becoming root allows me access to the directory and no other users, including bob. That works fine but I would like to make it so a password is required to access that dir. Is there a way to do that other than becoming root to access it?
The quickest and easiest route and therefore the most obvious route that I know of, would be gpg encryption to achieve what you desire. The use of the word obvious is not intended to belittle you but is a statement of generality. i.e. the first thing that comes to mind in this context. There are, of course, others who have might have a different opinion and this may not be obvious to them. I suggest that you read replies in the spirit that they are given and not with the preconceived notion that someone is having a go at you. The fact that I have made in excess of 2000 posts would seem to indicate that I have an interest in helping others else I wouldn't bother.

Last edited by TigerOC; 06-06-2006 at 02:53 PM.
 
Old 06-07-2006, 07:15 PM   #7
Freestone
Member
 
Registered: Jan 2003
Location: Brighton, Michigan
Distribution: FC5
Posts: 114

Original Poster
Rep: Reputation: 15
To all involved in this thread---my apologies.

TigerOC, I apologize for being an ass. This is a great forum and I regret doing something that would make it other than great. I have received a lot of help at LQ and I have helped others as well.
Having said that, I apologize for being a rude and flaming idiot in my response to you. These forums are about computers and I realize that. I am going through a very trying time in my personal life and I know for a fact that I used you to vent my frustrations. You, or this forum, are not the appropriate outlet.

I sincerely apologize for acting in a way that was offensive to anyone.
 
Old 06-08-2006, 01:54 AM   #8
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
No problem Freestone, it's forgotten.
 
  


Reply



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 protecting a folder ankit_mcgill Linux - General 4 04-14-2006 03:46 AM
Password protecting a directory? How? Thrifty Linux - Security 7 07-20-2004 08:25 PM
HTML password protecting darin3200 General 19 06-03-2003 03:13 AM
password protecting directories jayakrishnan Linux - General 2 02-10-2003 05:49 AM
password protecting a webpage jonfa Linux - General 5 03-22-2002 06:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:35 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