Forkbomb??
Simon Santoro
Simon.Santoro at poste.it
Mon Apr 4 19:42:32 UTC 2005
Jim Richardson wrote:
> 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.)
Or we could alias rm='mv --target-directory=$HOME/.Trash/'
instead.
But the immutable capability is really nice. I did not know it. Thank you.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20050404/775cc0a1/attachment.sig>
More information about the ubuntu-users
mailing list