protection from rm -r *

neild at ux.cs.man.ac.uk neild at ux.cs.man.ac.uk
Wed Oct 15 01:47:05 AEST 1986


	I would like to hear from anybody who has suggestions on, or knows of
implementations of, methods for reducing the consequences of commands like
"rm -r *". Particularly when accidently invoked by the super-user in the wrong
directory, e.g. "/"! Such methods must be as transparent as possible with
regard to the normal usage of "rm".

	In particular, I am interested in :-

	1)	A method for protecting files/directories that should not be
		unlinked/truncated while still allowing their contents to be
		modified. Making the parent directory non-writable is
		insufficient as it prevents other files from being created or
		removed. Further, the super-user should not be able to
		unlink/truncate protected files without explicitly, and
		separately, removing said protection first.

	2)	A method of retaining and reincarnating the pathname and
		contents of files that have been unlinked/truncated. The
		retention time of such files should be long enough for a user
		who has accidently clobbered a file to: realise what they have
		done, find out how to reincarnate a file and do/request it.
		Recovery from archives is impractical because they cannot be
		created often enough without consuming excessive amounts of
		cpu time and disk space.

Please send replies by mail using the addresses below. If requested and if I
have time I will post the best suggestions to the net or to those who request
them.  [Neil, maybe you'd send a summary to mod.os.unix??? -ed]

	Thanks in advance

*=============================================================================*
* R Neil Dyer,                   |                                            *
* Dept of Computer Science,      | Tel:   (+44) 61 273 7121 Ext 5018          *
* The University of Manchester,  | JANET: neild at uk.ac.man.cs.ux               *
* Oxford Road, Manchester        | UUCP:  mcvax!ukc!man.cs.ux!neild           *
* M13 9PL,                       | ARPA:  neild%uk.ac.man.cs.ux at cs.ucl.ac.uk  *
* UNITED KINGDOM.                |                                            *
*=============================================================================*



More information about the Mod.os.unix mailing list