home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / 3b1 / 2937 < prev    next >
Encoding:
Internet Message Format  |  1992-07-23  |  3.5 KB

  1. Path: sparky!uunet!beartrk!ceilidh!hijo-2!dnichols
  2. From: dnichols@ceilidh.beartrack.com (Don Nichols (DoN.))
  3. Newsgroups: comp.sys.3b1
  4. Subject: Re: tar and chown (was: Re: Cnews and dashes)
  5. Message-ID: <1992Jul24.034615.10048@ceilidh.beartrack.com>
  6. Date: 24 Jul 92 03:46:15 GMT
  7. References: <1992Jul16.235347.26899@ceilidh.beartrack.com> <Brszsw.2o3@hico2.westmark.com>
  8. Organization: D and D Data, Vienna Virginia
  9. Lines: 65
  10.  
  11. In article <Brszsw.2o3@hico2.westmark.com> kak@hico2.westmark.com (Kris A. Kugel) writes:
  12. >dnichols@ceilidh.beartrack.com (Don Nichols (DoN.)) writes:
  13. >: ...but since chown(2) rights are reserved to root, the changes
  14. >: never occur.  The authors of tar probably depended on this behavior of
  15.  
  16.     [ ... ]
  17.  
  18. >I seem to recall, (and have the manuals at home to check)
  19. >that version 7 unix allowed chown(1) to change file ownership,
  20. >and so I think that chown(2) for version 7 was NOT reserved for root.
  21. >I believe that the chown action change was part of the
  22. >the set of changes Berekley made to support accounting.
  23. >(Why do they need this restriction?  Let's say I have a diskspace
  24. > usage limit, so I make a big file -rw-rw-rw- and then chown it
  25. > to somebody else, who then gets billed for the space usage.
  26. > With the chown restriction, I can't do that trick anymore.
  27. > This probably would make e-mail more popular for transfering files
  28. > within a system, and make projects that required you be allowed
  29. > "root" permission more popular. )
  30.  
  31.     Well, I have the manuals *RIGHT HERE*.  From my copy of _UNIX
  32. Programmer's Manual_ ( Volume 1), revised and expanded edition, published by
  33. Holt Rinehart and Winston, Copyright 1983, 1979, Bell Telephone Laboratories,
  34. Incorporated:
  35.  
  36. Chown (1), third paragraph under DESCRIPTION heading:
  37.  
  38.     Only the super-user can change owner or group, in order to simplify
  39.     as yet unimplemented accounting procedures.
  40.  
  41. Chown (2), DESCRIPTION:
  42.  
  43.     The file whose name is given by the null-terminated string pointed
  44.     to by _name_ has its _owner_ and _group_ changed as specified.  Only
  45.     the super-user may execute this call, because if users were able to
  46.     give files away, they could defeat the (nonexistent) file-space
  47.     accounting procedures.
  48.  
  49.     I would have included the on-line man pages from my old v7 on 68000,
  50. but it is decomissioned at present, and it is too much trouble to dig them
  51. out of backup tapes. :-) I remember them as being similar in content, if not
  52. identical.  (BTW - the port of v7 in question was an early one by UniSoft.)
  53.  
  54. >Anyhow, as far as I know, Berekley DEVELOPED the chown restriction.
  55.  
  56.     Well, while my v7 *did* have some BSD influences, the manual from
  57. which I was quoting probably does not (It doesn't even admit the existance
  58. of csh(1)
  59.  
  60.     The only way that v7 chown could work for everyone would be if the
  61. system administrator had made it suid-root, which could make it *very*
  62. dangerous to have around.  (I admit the possibility of a re-written chown(1)
  63. which could be safely suid-root, and check that the real uid matched the
  64. file's owner before allowing the change.  If I were writing such a utility,
  65. I would probably also log attempts which failed because the user did not own
  66. the file in question. :-)
  67.  
  68.     If you still have access to that v7 system, (and it is still
  69. running), I suggest that you check the man page for chown(2), and check
  70. whether chown(1) has been made suid-root.
  71. -- 
  72. Donald Nichols (DoN.)     | Voice (Days): (703) 704-2280 (Eves): (703) 938-4564
  73. D&D Data                  |  Email: <dnichols@ceilidh.beartrack.com>
  74. I said it - no one else   |         <dnichols@ceilidh.aes.com>
  75.     --- Black Holes are where God is dividing by zero ---
  76.