Operating System - HP-UX
1838571 Members
3281 Online
110128 Solutions
New Discussion

Re: restricted access to directory

 
Daniel Ubeda
Frequent Advisor

restricted access to directory

Hi,

How can I do to restrict the access to a directory from a user ?
I need to assign to user X this home: /home/u1/X, and I need that this user can move up one level (/home/u1) and navigate, copy files, move files, etc.
I can use rsh, but I need to move up one level, and rsh not permit that.
any idea ??
thanks
Daniel
6 REPLIES 6
A. Clay Stephenson
Acclaimed Contributor

Re: restricted access to directory

Give him rsh as his shell and then create symbolic links from in his home directory to the directories that you wish him to access.
If it ain't broke, I can fix that.
Pete Randall
Outstanding Contributor

Re: restricted access to directory

Unless I'm missing something, I think you would need to use group permissions. If user x belongs to group y and /home/u1 is owned by group y, that should accomplish what you seek.

Pete

Pete
Daniel Ubeda
Frequent Advisor

Re: restricted access to directory

I most like to create links !! is most restrictive !!!

I will make a test

thanks
Daniel
Daniel Ubeda
Frequent Advisor

Re: restricted access to directory

I have test the symbolic links solution, and rsh (and rksh) shells, but it not work because the rsh and rksh limit the use of cd command.

any idea ??
Daniel
A. Clay Stephenson
Acclaimed Contributor

Re: restricted access to directory

The symbolic links will work; you, of cource can't cd to them under rsh.

e.g.

In your users home dir:
ln -s /home/user1 myuser1

Now you can copy any files from myuser1. ls myuser1 will list the files and ls -Ll myuser1 will do a long listing. You can do all the operations you require; you just have to do them a bit differently.
If it ain't broke, I can fix that.
Michael Steele_2
Honored Contributor

Re: restricted access to directory

Also experiment with the SETGID bit which makes a file executable to the group. Use:

chmod 2### /dir
-or-
chmod g+s /dir

Examples: With execute permission.

-rwsr-sr-- 1 bill user 242 Jun 13 2002 abc1

Without execute permission.

-rwSr-Sr-- 1 bill user 242 Jun 13 2002 abc2


Support Fatherhood - Stop Family Law