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