Re: password-protection of directory
- From: Aragorn <stryder@xxxxxxxxxxxxxxx>
- Date: Sat, 15 Apr 2006 16:29:24 GMT
On Saturday 15 April 2006 18:09, Marten Kemp stood up and spoke the
following words to the masses in /comp.os.linux.misc...:/
Bill Marcum wrote:
On 14 Apr 2006 10:54:26 -0700, sanky
<sankarghosh@xxxxxxxxx> wrote:
[...] Say, I'm working on my home directory and I wish to password
protect a folder under it, so that whenever I'll $cd or $ls to
that folder, it will prompt for some password that I'd given
earlier. How can I achieve this..by some script..by some tweaking or
whatsoever.
You could encrypt it, or have it owned by a different user, and you
could write aliases for the cd and ls commands.
I'm a newbie in the Linux arena.
What happens when one user acceses a file or folder owned
by another user without the appropriate permissions?
"Directory", not "folder"... ;-)
Normally, no user can access files in another user's home directory.
At first I thought that this would be a good place to put a
call to an ESM (External Security Manager, essentially a
daemon that controls access to secured resources), then I
realized that creating a group of users allowed access to
the resource and assigning users to that group would should
work. Users *can* be assigned to multiple groups, right?
They can be, yes, and there are various mechanisms to further fine-grain
the permissions someone has on a file or directory - which you should
see entirely in the context of files and directories which are shared
among users, and which therefore by definition should not be located in
any particular user's home directory.
An example of such finegraining is the uppercase "X" permission, which
gives users "x" permission - i.e. execute permission for files,
traverse permission for directories - if the user belongs to a group of
which at least one other member has "x" permission on that particular
file or directory.
See...
man chmod
.... for details. ;-)
Another method of fine-graining security is by using ACL's (Access
Control Lists). Most of the GNU/Linux filesystems - i.e. /ext3,/
/reiserfs,/ /reiser4/ and /xfs,/ possibly /jfs/ as well - support them,
but they have to be mounted with ACL's as a mount option.
It all depends on what you want to accomplish in terms of security.
Perhaps you should also look into the SELinux project, which is a way
to harden a GNU/Linux system even further, among other things by using
ACL's.
--
With kind regards,
*Aragorn*
(Registered GNU/Linux user #223157)
.
- References:
- password-protection of directory
- From: sanky
- Re: password-protection of directory
- From: Bill Marcum
- Re: password-protection of directory
- From: Marten Kemp
- password-protection of directory
- Prev by Date: Re: password-protection of directory
- Next by Date: Re: hacked?
- Previous by thread: Re: password-protection of directory
- Next by thread: Re: password-protection of directory
- Index(es):
Relevant Pages
|