Subject: Re: undoing chflags schg ?
To: None <y0001006@ws.rz.tu-bs.de>
From: Hacksaw <hacksaw@user1.channel1.com>
List: netbsd-help
Date: 04/19/1997 23:57:57
>I probably did a stupid thing: I did "chflags schg /netbsd". Now 
>I can't move or delete that file. 
>
>The question: How do I undo the above operation, if I try
>"chflags noschg /netbsd" I simply get "Permission denied", 
>with rm it's the same.
>
>Many thanks for an answer ...

     The ``SF_IMMUTABLE'' and ``SF_APPEND'' flags may only be set or unset by
     the super-user.  They may be set at any time, but normally may only be
     unset when the system is in single-user mode.  (See init(8) for details.)

The lovely thing about Unix is there is almost nothing you can change
back and forth. However, some things are a little harder, probably to
prevent security leaks.

So you will need to shutdown -r now, and when the kernal loader
message comes on, hit "-s" it response to it's offer of a place to
specify a different disk and kernel. That will bring it up in single
user mode.

The do chflags noschg, then ls -lo to verify that the flag has gone
away. You can then copy in a new kernel or whatever if you like to do
those things in single user mode, or just hit ^D to get it to boot the
rest of the way into multiuser mode.

Happy kernal modding...
--
Hacksaw