home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / question / 10575 < prev    next >
Encoding:
Internet Message Format  |  1992-08-31  |  2.0 KB

  1. Path: sparky!uunet!stanford.edu!unixhub!unixhub.slac.stanford.edu!alhy
  2. From: alhy@unixhub.slac.stanford.edu (J. Scott Berg)
  3. Newsgroups: comp.unix.questions
  4. Subject: Re: How can I allow access to a subdirectory without risking other files?
  5. Message-ID: <5389@unixhub.SLAC.Stanford.EDU>
  6. Date: 31 Aug 92 19:53:57 GMT
  7. References: <92Aug25.200814.1577@acs.ucalgary.ca> <92Aug26.165308.27634@acs.ucalgary.ca> <Btq39I.1on@chinet.chi.il.us>
  8. Sender: news@unixhub.SLAC.Stanford.EDU
  9. Reply-To: alhy@unixhub.slac.stanford.edu
  10. Organization: Stanford University, dept of Physics / SLAC
  11. Lines: 33
  12. Nntp-Posting-Host: courant.slac.stanford.edu
  13.  
  14. >I know how to give group/other access to a subdirectory without risking my
  15. >other files, however, I want people to be able to read/write to ANY file in
  16. >the subdirectory. That includes files put there by other people.  The only way
  17. >I know of to do this is to make sure that everyone has their umask set to 000
  18. >when they are working in that subdirectory.
  19.  
  20. Okay, how about this:  create a user, "elvis".  Make the directory in
  21. question owned by elvis, and have the permission be rwx for elvis
  22. ONLY.  (Actually, you can probably make it rx for everyone else).
  23. Then write a setuid script kinglives which contains the following lines:
  24.  
  25. cd /graceland
  26. exec /bin/csh
  27.  
  28. or you could be fancier and try to figure out what the user's shell
  29. actually is and exec that.  This way, (I think) nobody can write into
  30. graceland except elvis. When a use executes kinglives, (s)he becomes
  31. elvis and can do anything to graceland.
  32.  
  33.                 -Scott Berg
  34.  
  35. -- 
  36. -------------------------------------------------------------------------------
  37. The opinions expressed here are, of course, my own and nobody else's.
  38. -------------------------------------------------------------------------------
  39. J. Scott Berg
  40. email: alhy@unixhub.slac.stanford.edu
  41. real mail: Varian Physics
  42.            Stanford  CA  94305-4060
  43. phone:    (415) 926-4732 (w)
  44.      (415) 326-2631 (h)
  45. -------------------------------------------------------------------------------
  46.  
  47.