From owner-freebsd-bugs Tue Jun 6 22:59:03 1995 Return-Path: bugs-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id WAA02530 for bugs-outgoing; Tue, 6 Jun 1995 22:59:03 -0700 Received: from westhill.cdrom.com (westhill.cdrom.com [192.216.223.57]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id WAA02523 for ; Tue, 6 Jun 1995 22:59:02 -0700 Received: from localhost.cdrom.com (localhost.cdrom.com [127.0.0.1]) by westhill.cdrom.com (8.6.11/8.6.11) with SMTP id WAA17222 ; Tue, 6 Jun 1995 22:58:07 -0700 X-Authentication-Warning: westhill.cdrom.com: Host localhost.cdrom.com didn't use HELO protocol To: Heikki Suonsivu cc: freebsd-bugs@freefall.cdrom.com Subject: Re: kern/495: Unremovable file? In-reply-to: Your message of "Tue, 06 Jun 1995 21:10:02 PDT." <199506070410.VAA29596@freefall.cdrom.com> Date: Tue, 06 Jun 1995 22:58:06 -0700 Message-ID: <17220.802504686@westhill.cdrom.com> From: Gary Palmer Sender: bugs-owner@FreeBSD.org Precedence: bulk In message <199506070410.VAA29596@freefall.cdrom.com>, Heikki Suonsivu writes: >hsu#katiska.clinet.fi Wed 68: ls -l .overview >-rw-rw-r-- 1 news news 31939 May 9 07:38 .overview >hsu#katiska.clinet.fi Wed 69: mv .overview foo >mv: cannot move `.overview' to `foo': Operation not permitted >hsu#katiska.clinet.fi Wed 70: L -d . >drwxrwxr-x 2 news news 512 Jun 7 06:52 ./ >hsu#katiska.clinet.fi Wed 71: chmod 777 . >hsu#katiska.clinet.fi Wed 72: rm .overview >rm: remove `.overview'? y >rm: .overview: Operation not permitted >hsu#katiska.clinet.fi Wed 73: L >total 35 >drwxrwxrwx 2 news news 512 Jun 7 06:52 ./ >drwxr-xr-x 3 hsu wheel 1536 Jun 7 04:38 ../ >-rw-rw-r-- 1 news news 31939 May 9 07:38 .overview [...] >It stays over reboot or fsck. It cannot be renamed, but the directory it is >in can be moved. > >I think I have seen a similar thing on NFS mounted file system, but the >offending file could be removed from the NFS server. Have you done a `ls -alo .overview'? Is the 5th field `schg'? If so, that is the problem. The imutable flag is set, which means it can't be removed or renamed. If you look, /sbin/init is set the same way, for obvious reasons. `chflags noschg' will cure the problem I bet. if so, can you let us know so I can close this PR? This isn't really a bug, unless the system set this flag through a bug, which is possible, but I haven't seen this on our own news server with a full feed and a 8.6Gb news spool partition. > fsck should be able to detect and remove these? That is, if it > is a filesystem problem, not something else. > > All computer programs should have a --force or > --I-know-what-I-am-doing option! They do, and this was debated recently, and it was decided that the imutable flags should not be over-ridden, even by the super-user. See man 1 chflags and man 8 init for more details on these file flags. Gary