home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / linux / 9108 < prev    next >
Encoding:
Internet Message Format  |  1992-08-25  |  1.2 KB

  1. Path: sparky!uunet!mcsun!news.funet.fi!hydra!klaava!torvalds
  2. From: torvalds@klaava.Helsinki.FI (Linus Benedict Torvalds)
  3. Newsgroups: comp.os.linux
  4. Subject: Re: Suid/sgid
  5. Message-ID: <1992Aug26.075014.9277@klaava.Helsinki.FI>
  6. Date: 26 Aug 92 07:50:14 GMT
  7. References: <1992Aug25.230907.10073@utstat.uucp>
  8. Organization: University of Helsinki
  9. Lines: 21
  10.  
  11. In article <1992Aug25.230907.10073@utstat.uucp> rafal@utstat.uucp (Rafal Kustra (summer student)) writes:
  12. >Perhaps this should be posted to other group
  13. >but I only have time to read this one + some local
  14. >ones ;).
  15. >OK, here is the beef.
  16. >Either I don't understand the concept of suid/sgid
  17. >(**very** possible) or there is something wrong.
  18. >Say root creates a script like follows:
  19. >    cat $*
  20. >and sets it suid.
  21. >Now normal user could cat any r--.....
  22. >file with it, right?
  23.  
  24. You aren't misunderstanding the concepts, but suid only works on actual
  25. binary executables, not shell (or any other kind of) scripts.  The
  26. reasons are security, security and security.  It /may/ be possible to
  27. make a suid shell script secure, but it's so easy to make them a
  28. (non-obvious) security hazard that it's definitely a bad idea to allow
  29. them.  So linux ignores the suid/sgid bits when executing scripts. 
  30.  
  31.         Linus
  32.