Jump to content

Directory security


Totovich
 Share

Recommended Posts

When I want to protect a documents directory, I click right on the directory, chose the permission riights tab, then advanced options,

but I want a password on the directory. I can chose for set up UID, or GID, but don't know exactly what it is.

I guess user Id and group id, but don't know how to protect the directory with a password.

can someone help me out?

 

(using mandrake 10.1)

Link to comment
Share on other sites

You don't need a password to protect a directory since you are already asked for a password when you log-in. Just set that directory to your own user id and group, remove "others" and maybe "group" prermissions for reading, writting and executing, and then you are done, that directory will be safe. More info in "man chmod".

 

As I've already told you in another post you should take a look to some very basic info about linux to see how a Unix system (hence GNU/Linux) works... but seems that you have ignored me :angry:

Edited by aru
Link to comment
Share on other sites

You don't need a password to protect a directory since you are already asked for a password when you log-in. Just set that directory to your own user id and group, remove "others" and "all" prermissions for reading, writting and executing, and then you are done, that directory will be safe. More info in "man chmod".

 

As I've already told you in another post you should take a look to some very basic info about linux to see how a Unix system (hence GNU/Linux) works... but seems that  you have ignored me  :angry:

 

No I didn't ignore you, but that was not the question. I know I can set up different users etc, but what I want is in the same user login, a password on a directory. I know how I can protect them from different users logins, and that's why the GID and UID is there, but just easilly: I log in, I want to open my docs folder, and before I enter it, I want to be asked for a password.

 

One solution may be to put the folder in a different user log in, and use that log in to store protected files, but I want it easier.

Link to comment
Share on other sites

This answer from you takes me to two different coclusions:

  1. You don't trust yourself
  2. You don't understand how a Unix system should work

I can't do anything for A, but for B I already told you to read some basic information, but as you still insisting may I say you that you have to set up at least an user account for each user you are going to let use your computer (home network?). That is extremly secure, no one can access your account files except root, but you are root too, aren't you?

 

So again don't take me bad, I insist in you to read basic information that should be mandatory for every newbie. It is not a RTFM it is more like a favor. Any veteran linux user reading this thread should agree with me. :D

 

Maybe the links I posted aren't the best, but as a beginning are OK

 

HTH

Link to comment
Share on other sites

Totovich

Try this line of thinking (which may emulate what aru has told you)

Think of your /home/you partition as one big folder. And in there you keep all your private stuff. Now, you don't want this folder full of hundreds of files, it would be messy wouldn't it? so you create separate folders to keep everything neat and tidy.

Now how do protect all that stuff? Well you have already done that by creating a password for that "big folder" so you don't need any more passwords for the separate folders inside, or the files with in.

 

The above is good enough for a basic home system. If you want to create a web site where some folders are available to all, but some have restricted access, you can protect these folders by inserting a .ht access file. This will require any visitor wanting access to that special folder to enter a password.

But your not running a web site yet, so you don't need that.

 

aru gave you some links to some basic Linux stuff for beginners. The one written by Tom Berger (who incidently created this board) is as aru mentioned a little out of date. However, the man was not only a Linux guru but wrote all his tutorials assuming the reader knew nothing about Linux. The tutorials contain hundreds of pages of easy to follow tips and knowledge.

Its a great place to start learning not only the basics but advanced topics also. Try to understand the structure of Linux first, it will save you lots of wasted time and headaches. ;)

http://mandrakeuser.org/docs/index.html

Link to comment
Share on other sites

Let me ad my voice....

Seriously we are not ganging up... heck you have advice from two REAL guru'sd there! (seriously)

 

What you want is achievable but not how you are going about it ... you could create a seperate partition and not allow the user to mount it ... and force them to sudo ... you could use an encrypted filesystem...

 

but both of these are involved and rather than just send you down the wrong path we are trying to get you to read up a bit and explain what your trying to achieve a bit more.... rather than waste your and our time.... and then you discover that's not quite what you want... B)

Link to comment
Share on other sites

You could add a directory such as /mine, set all permissions to root only for view and modify. Then only root can access & look inside. It would be password protected with root password then.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...