One method in AmigaDOS, there's a command called protect that sets/unsets bits to allow or prevent reading, writing, deleting, executing along with misc. flags....
You can unset those bits using the command:
protect
-
(guys, correct me if I'm wrong--I haven't used this command in a long time since I use a directory utility prg)
where - unsets flags, and + sets flags
if you were to keep the file from deleting or writing I use:
protect s:startup-sequence -wd
and when you use the list command:
list S:startup-sequence
you will see that the "w" and "d" are replaced by "-" (dashes). If you try to write over or delete, AmigaDOS will not allow it.