home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / os / linux / 21796 < prev    next >
Encoding:
Text File  |  1992-12-27  |  1.4 KB  |  46 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!uunet.ca!xenitec!mongrel!shrdlu!gdm
  3. From: gdm@shrdlu.kwnet.on.ca (Giles D Malet)
  4. Subject: BUG ? I can clobber root's files with `mv'
  5. Organization: 3.141592653589793238462643383279502884197169399
  6. Date: Sun, 27 Dec 1992 05:19:21 GMT
  7. Message-ID: <BzwK49.H1u@shrdlu.kwnet.on.ca>
  8. Lines: 36
  9.  
  10. With the text/sticky (?) bit set on /tmp, I am unable to delete
  11. other users files, quite rightly. But I have discovered a roundabout
  12. way of achieving the same thing - mv one of my files onto theirs, then
  13. delete it.
  14.  
  15. Take a look at this (I am running as gdm.user) :
  16.  
  17. ----------------------------
  18. /tmp $ ls -ld /tmp
  19. drwxrwxrwt   2 bin      bin          1552 Dec 26 23:59 /tmp
  20.  
  21. /tmp $ ls -l
  22. total 0
  23. -rw-r--r--   1 gdm      user            0 Dec 26 23:59 gdm.file
  24. -rw-r--r--   1 root     root            0 Dec 26 23:59 root.file
  25.  
  26. /tmp $ rm root.file
  27. rm: remove `root.file', overriding mode 0644? y
  28. rm: root.file: Operation not permitted
  29.  
  30. /tmp $ mv gdm.file root.file
  31. mv: replace `root.file', overriding mode 0644? y
  32.  
  33. /tmp $ ls -l
  34. total 0
  35. -rw-r--r--   1 gdm      user            0 Dec 26 23:59 root.file
  36. ----------------------------
  37.  
  38. Now I can just delete that file...
  39.  
  40. Is this meant to be possible ?
  41.  
  42. gdm
  43. -- 
  44. Giles D Malet                                             gdm@shrdlu.kwnet.on.ca
  45. Waterloo, Ont, Canada       +1 519 725 5726       gdmalet@descartes.uwaterloo.ca
  46.