On Fri, 2001-10-12 at 14:53, Eric Wood wrote:
> [ewood@seawolf ewood]$ ls -ld /dev/shm
> drwxrwxrwt    2 root     root            0 Oct 12 08:56 /dev/shm
> 
> [ewood@seawolf shm]$ ls -l
> total 4964
> -rw-rw-rw-    1 cdavis   cdavis       1024 Oct 12 08:37 SCRTX31
> 
> [ewood@seawolf shm]$ rm SCRTX31
> rm: cannot unlink `SCRTX31': Operation not permitted
> 
> 
> Now, on a real filesystem I (or another user) can rm these scratch files
> just fine because they are rw-rw-rw.

No. Whether or not you can delete (or rename) a file depends on the
permissions of the directory it is in, because this is basically
"writing the directory file". In order to have sane /tmp directories
(i.e. another user can't delete my files just because (s)he can write to
the directory), they have the sticky bit set (as in "drwxrwxrwt") which
means that files my only be deleted by their owner or root.

Nils
-- 
           Nils Philippsen / +49.711.96437.250 / [EMAIL PROTECTED]
         Red Hat GmbH / Hauptst�tter Stra�e 58 / D70178 Stuttgart
  "Those who would give up essential liberty to purchase a little
  temporary safety deserve neither liberty nor safety." -- Benjamin
Franklin

Attachment: msg04118/pgp00000.pgp
Description: PGP signature

Reply via email to