Forkbomb??

Jim Richardson warlock at eskimo.com
Mon Apr 4 18:39:12 UTC 2005


On Mon, 2005-04-04 at 17:08 +1000, Stuart Bishop wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Simon Santoro wrote:

<snip>

> > rm -rf ~
> > How? Remove write access to my files because I could delete them.
> 
> Unfortunately apart from backup tools, the only way of protecting against
> this would be to have snapshotting or undo facility built into the
> filesystem such as is the case with high end fileservers such as NetApps and
> similar. Thankfully there is already this safety net in the GUI in the form
> of the trashcan so naieve users are protected, but getting this at the
> filesystem level is something for the future.
> 


There is a trick that will help, with a couple of caveats. If you are
using ext2/3 or another file system that has the immutable flag, then
perform something like this

touch %NoRM%

touch .%NoRM%

chattr +i ,%NoRM% %NoRM%


this will create two immutable files in the directory, an rm -rf ./ or
whatever, will balk at the first immutable file it sees, the second
caveat is that some LOCALE settings have different order sequences, and
% might not be at the front for them, so if you aren't using a "normal"
english like one, experiment to see what character is first. (Excluding
non printable ones of course.)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20050404/7c9b51d4/attachment.sig>


More information about the ubuntu-users mailing list