Immutable files on UFS?

Garrett Cooper yaneurabeya at
Thu Apr 10 22:12:46 UTC 2014

On Thu, Apr 10, 2014 at 3:04 PM, Gary Palmer <gpalmer at> wrote:


> Try looking at files in that directory with the '-o' flag to ls.  e.g.
> ls -lago /usr/obj~/usr/src/tmp/usr/lib/engines/

Thanks for the extra ls -l command (so many flags, so little time!).

> If you see files with 'schg' on them, then run

Unfortunately there aren't any. chflags -R 0 clears all of the chflags
on files. I always run that instead of running noschg nowadays on
directories like /usr/obj*, like buildworld does.

> chflags noschg <filename>
> You could also do
> chflags -PR noschg /usr/obj~/

Hmm... didn't try it without -P. According to the manpage it should be
the default, but it wasn't when I ran it. That solved my issue with
the pjdfstest file, but not /usr/obj~.

> although be careful, as some files on the filesystem (such as /lib/*)
> are meant to be immutable.

Indeed :).

> If you are running with a securelevel above 0 the above won't be possible.

My kern.securelevel's unset :).


More information about the freebsd-fs mailing list