Subject: Re: wu-ftpd: Re: Undeletable - how?

From: [email-masked] (Andy Church)
Date: Fri, 20 Mar 1998 10:52:20 EST

>On Unix systems setting the sticky-bit prevents anybody but the owner
>of the file from deleting it.

     Looks like this behavior isn't standard:

crystal:/home/achurch> uname -a
Linux crystal 2.0.23 #84 Sun Nov 16 16:34:06 EST 1997 i586
crystal:/home/achurch> id
uid=501(achurch) gid=100(users) groups=100(users),4(adm),17(su),18(console)
crystal:/home/achurch> su -c 'touch test ; chmod 1555 test'
Password: 
crystal:/home/achurch> ls -l test
-r-xr-xr-t   1 root     root            0 Mar 20 10:47 test
crystal:/home/achurch> rm test
rm: remove `test', overriding mode 1555? y
crystal:/home/achurch> ls -l test
/bin/ls: test: No such file or directory

  --Andy Church                  | If Bell Atlantic really is the heart
    [email-masked]       | of communication, then it desperately
    www.dragonfire.net/~achurch/ | needs a quadruple bypass.

---

From: Jon Lewis <[email-masked]>
Date: Sat, 21 Mar 1998 00:21:56 -0500 (EST)

> rm: remove `test', overriding mode 1555? y

You didn't write to test...you wrote to your home directory.

------------------------------------------------------------------
 Jon Lewis <[email-masked]>  |  Unsolicited commercial e-mail will
 Network Administrator       |  be proof-read for $199/message.
 Florida Digital Turnpike    |  
______http://inorganic5.fdt.net/~jlewis/pgp for PGP public key____

---

From: Bret McDanel <[email-masked]>
Date: Mon, 23 Mar 1998 10:34:50 -0500

Since there seems to be some confusion about this, I will attempt to
clarify :)

The sticky bit means different things, depending if its a file or a
directory..  On a binary executable, it means keep the program in memory
after people have quit, and on BSD (pre 4.4, maybe pre 4.3) systems, it
means to share the same code section with all people using the program.. 
This can save memory beucase if 2 people execute the same program at the
same time, they share some memory (the data section is seperate for each
invocation)..  On sysVr4 and BSD 4.4 (maybe BSD 4.3, unsure) systems they
automagically share the code section anyway..

The sticky bit on a directory means that no one but the owner (or root) can
delete the file..  This is why /tmp is typically mode 1777..  So anyone can
write to it, but you can only delete your own stuff (unless the file itself
is writable to you)..

---Reply on mail from Jon Lewis about wu-ftpd: Re: Undeletable - how?

>> uidP1(achurch) gid0(users) groups0(users),4(adm),17(su),18(console)
---End reply
-- 
Bret McDanel                                    http://www.rehost.com
Realistic Technologies, Inc.                             973-514-1144

     These opinions are mine, and may not be the same as my employer