Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multilevel Permission Confusion 1

Status
Not open for further replies.

tbohon

Programmer
Apr 20, 2000
293
US
I've been asked to set up a directory (let's call it dirA) under which are n subdirectories (call them subA, subB, subC, etc.) The idea (as I understand it right now) is to set up a download system for physicians where physician A can only see/access subA and it's contents, physician B can only see/access subB, etc. Furthermore, they don't want physician A to even know that subB, subC, etc. even exist.

My head hurts! :)

Anyway, I've tried several combinations of permissions for dirA and subX without success - they receive an error message that they don't have access to that directory. My latest thought was that I needed to set permissions of 740 on dirA and 744 on subX since the physicians will all be coming in as 'world' ... no luck.

This HAS to be easier than I'm trying to make it ... and I'm hoping someone with a more detached view will be able to tell me what I'm doing wrong here.

Thanks as always for your comments and suggestions.

Best,

Tom

"My mind is like a steel whatchamacallit ...
 
Look into Ken's solution of [tt]chroot[/tt] first.

First of all, what do you mean they are all coming in as "world"? If they're coming in using the same account, there's nothing you can do.

Also, how are they coming in? Logging in? FTP? Like UnixJunky says, need more info!!

Using just permissions and separate accounts, maybe something like this. They just need execute permission on [tt]/dirA[/tt] to access their subdirectory. With no Read or Write permissions on [tt]/dirA[/tt], they won't be able to see the other directories, but they will be able to access their own.
Code:
mkdir /dirA
mkdir /dirA/subA /dirA/subB /dirA/subC

chown root:root /dirA
chown userA:users /dirA/subA
chown userB:users /dirA/subB
chown userC:users /dirA/subC

chmod 701 /dirA
chmod 700 /dirA/subA
chmod 700 /dirA/subB
chmod 700 /dirA/subC
This way they have full access to their own subdirectory, but can't see the other subdirectories in [tt]/dirA[/tt].
 
Sorry I wasn't totally clear - I was trying to rush through a bunch of stuff all at once.

Appreciate the comments - I think the comment from SamBones mirrors what I had in mind ... it was the chmod 701 /dirA that I forgot.

Another learning experience even for us old folks! :)

Thanks all.

Tom

"My mind is like a steel whatchamacallit ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top