Home arrow Journal arrow Cannot Delete a File or Directory in FreeBSD
Cannot Delete a File or Directory in FreeBSD PDF
Thursday, 06 October 2011
If you cannot delete a file or directory in FreeBSD even if you are root then this means the file (or directory) has the schg flag set. This flag sets the file as system imutable, so it could not be deleted.

To be able to delete we can reset the file flags using:

  chflags 0 file_name

If multiple files or directories within a directory have this flag set, we can reset all with:

  chflags -R 0 dirname

 
< Prev   Next >

Other BSD Systems

OpenBSD

Misc

Solaris

Polls

Best BSD firewall?