home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!stanford.edu!unixhub!unixhub.slac.stanford.edu!alhy
- From: alhy@unixhub.slac.stanford.edu (J. Scott Berg)
- Newsgroups: comp.unix.questions
- Subject: Re: How can I allow access to a subdirectory without risking other files?
- Message-ID: <5389@unixhub.SLAC.Stanford.EDU>
- Date: 31 Aug 92 19:53:57 GMT
- References: <92Aug25.200814.1577@acs.ucalgary.ca> <92Aug26.165308.27634@acs.ucalgary.ca> <Btq39I.1on@chinet.chi.il.us>
- Sender: news@unixhub.SLAC.Stanford.EDU
- Reply-To: alhy@unixhub.slac.stanford.edu
- Organization: Stanford University, dept of Physics / SLAC
- Lines: 33
- Nntp-Posting-Host: courant.slac.stanford.edu
-
- >I know how to give group/other access to a subdirectory without risking my
- >other files, however, I want people to be able to read/write to ANY file in
- >the subdirectory. That includes files put there by other people. The only way
- >I know of to do this is to make sure that everyone has their umask set to 000
- >when they are working in that subdirectory.
-
- Okay, how about this: create a user, "elvis". Make the directory in
- question owned by elvis, and have the permission be rwx for elvis
- ONLY. (Actually, you can probably make it rx for everyone else).
- Then write a setuid script kinglives which contains the following lines:
-
- cd /graceland
- exec /bin/csh
-
- or you could be fancier and try to figure out what the user's shell
- actually is and exec that. This way, (I think) nobody can write into
- graceland except elvis. When a use executes kinglives, (s)he becomes
- elvis and can do anything to graceland.
-
- -Scott Berg
-
- --
- -------------------------------------------------------------------------------
- The opinions expressed here are, of course, my own and nobody else's.
- -------------------------------------------------------------------------------
- J. Scott Berg
- email: alhy@unixhub.slac.stanford.edu
- real mail: Varian Physics
- Stanford CA 94305-4060
- phone: (415) 926-4732 (w)
- (415) 326-2631 (h)
- -------------------------------------------------------------------------------
-
-