httpd-modsec2_debug.log: Operation not permitted

perryh at perryh at
Sat Jan 15 10:11:31 UTC 2011

Ian Smith <smithi at> wrote:

> Swe, I suspect the reason you can't just delete these files is
> likely because something has them open for writing, and the system
> won't let you remove such files, naturally enough.

Really?  Must be a fairly recent change -- and IMO not necessarily
a good one.  For one thing, it would break one of the long-standing
methods for ensuring that scratch files get cleaned up when a
program exits, even under circumstances which don't allow for signal
handlers to be run.

Last I knew having a file open, even for writing, was no protection
against its last link being removed.  The _inode_ won't go away
until the last handle is closed, but the _directory entry_ can still
be removed.

More information about the freebsd-questions mailing list