dnel Oct 13, 2016 #1 I unpacked base.txz onto a running FreeBSD system and then went to remove it, however because permissions on some files look like this: Code: -r-sr-xr-x 1 root wheel 26320 Sep 29 02:45 login* Even root cannot delete these files. What can I do to forcibly delete them?
I unpacked base.txz onto a running FreeBSD system and then went to remove it, however because permissions on some files look like this: Code: -r-sr-xr-x 1 root wheel 26320 Sep 29 02:45 login* Even root cannot delete these files. What can I do to forcibly delete them?
SirDice Administrator Staff member Administrator Moderator Oct 13, 2016 #2 Use chflags(8) to remove the schg flag. A lot of files of the base OS are protected this way. Example: chflags -R noschg /usr/bin
Use chflags(8) to remove the schg flag. A lot of files of the base OS are protected this way. Example: chflags -R noschg /usr/bin
K kpa Oct 13, 2016 #3 To list the flags on any file, let's say on /sbin/init that is protected from deletion: ls -lo /sbin/init Code: % ls -lo /sbin/init -r-xr-xr-x 1 root wheel schg 1061880 Sep 29 14:23 /sbin/init
To list the flags on any file, let's say on /sbin/init that is protected from deletion: ls -lo /sbin/init Code: % ls -lo /sbin/init -r-xr-xr-x 1 root wheel schg 1061880 Sep 29 14:23 /sbin/init