home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.linux
- Path: sparky!uunet!uunet.ca!xenitec!mongrel!shrdlu!gdm
- From: gdm@shrdlu.kwnet.on.ca (Giles D Malet)
- Subject: BUG ? I can clobber root's files with `mv'
- Organization: 3.141592653589793238462643383279502884197169399
- Date: Sun, 27 Dec 1992 05:19:21 GMT
- Message-ID: <BzwK49.H1u@shrdlu.kwnet.on.ca>
- Lines: 36
-
- With the text/sticky (?) bit set on /tmp, I am unable to delete
- other users files, quite rightly. But I have discovered a roundabout
- way of achieving the same thing - mv one of my files onto theirs, then
- delete it.
-
- Take a look at this (I am running as gdm.user) :
-
- ----------------------------
- /tmp $ ls -ld /tmp
- drwxrwxrwt 2 bin bin 1552 Dec 26 23:59 /tmp
-
- /tmp $ ls -l
- total 0
- -rw-r--r-- 1 gdm user 0 Dec 26 23:59 gdm.file
- -rw-r--r-- 1 root root 0 Dec 26 23:59 root.file
-
- /tmp $ rm root.file
- rm: remove `root.file', overriding mode 0644? y
- rm: root.file: Operation not permitted
-
- /tmp $ mv gdm.file root.file
- mv: replace `root.file', overriding mode 0644? y
-
- /tmp $ ls -l
- total 0
- -rw-r--r-- 1 gdm user 0 Dec 26 23:59 root.file
- ----------------------------
-
- Now I can just delete that file...
-
- Is this meant to be possible ?
-
- gdm
- --
- Giles D Malet gdm@shrdlu.kwnet.on.ca
- Waterloo, Ont, Canada +1 519 725 5726 gdmalet@descartes.uwaterloo.ca
-