Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 06 Jun 1995 22:58:06 -0700
From:      Gary Palmer <gpalmer@westhill.cdrom.com>
To:        Heikki Suonsivu <hsu@clinet.fi>
Cc:        freebsd-bugs@freefall.cdrom.com
Subject:   Re: kern/495: Unremovable file? 
Message-ID:  <17220.802504686@westhill.cdrom.com>
In-Reply-To: Your message of "Tue, 06 Jun 1995 21:10:02 PDT." <199506070410.VAA29596@freefall.cdrom.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?17220.802504686>