Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Feb 2000 11:16:38 +0200
From:      Ruslan Ermilov <ru@ucb.crimea.ua>
To:        John <papalia@udel.edu>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Improper use of chflags(1) (was: Re: Failed Installworld... Help?)
Message-ID:  <20000218111638.D59251@relay.ucb.crimea.ua>
In-Reply-To: <4.1.20000216234007.009febf0@mail.udel.edu>; from John on Wed, Feb 16, 2000 at 11:41:58PM -0500
References:  <4.1.20000216124259.00a4b100@mail.udel.edu> <4.1.20000216124259.00a4b100@mail.udel.edu> <20000216200539.A34276@relay.ucb.crimea.ua> <4.1.20000216234007.009febf0@mail.udel.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Feb 16, 2000 at 11:41:58PM -0500, John wrote:
> Hey all...
> Any ideas what might cause the following error?  I'm performing the install
> as root from the console.   A friend suggested I might be running out of
> space in one of my file systems, but I doubt that's the problem since all
> my files systems have 400M free or more.  Any ideas?  Thanks!!!! --John
> ===> bin
> ===> bin/cat
> install -c -s -o root -g wheel -m 555   cat /bin
> /usr/obj/var/src/tmp/usr/libexec/elf/strip: /bin/stQ23863: Operation not
> permitted
> *** Error code 70
> 
> Stop.
> *** Error code 1
> 
John was so kind to set up an account for me on his promlematic host,
and here is what I have figured out:

% ls -old /bin
drwxr-xr-x  2 root  wheel  schg 512 Nov 14 20:38 /bin

Note the `schg' flag?  This flag essentialy disables all the modification
of /bin catalog.  It could not be renamed, deleted, or modified (i.e.
no *new*files could be installed into or dropped from it, and no files
in it could be modified, e.g. by strip(1)).

Look what happens here (on my host):

Script started on Fri Feb 18 11:02:21 2000
# ls -old . a
drwxr-xr-x  2 root  wheel  schg  512 18 Feb 10:59 .
-rwxr-xr-x  1 root  wheel  -    3065 18 Feb 11:01 a
# strip a
/usr/libexec/elf/strip: ste73282: Operation not permitted
# chflags noschg .
# strip a
Script done on Fri Feb 18 11:02:49 2000


How to fix.
From multi-user mode if kern.securelevel <= 0, or from single-user if > 0:

# chflags -R noschg / (this will take a while)
# shutdown now
# cd /usr/src
# make installworld
# (upgrade /etc and /dev if needed)
# reboot
# man -a chflags

The real `chflags -R noschg ...' procedure may vary depending on whether
you have non-UFS filesystems mounted (e.g, NFS) or not.


Enjoy,
-- 
Ruslan Ermilov		Sysadmin and DBA of the
ru@ucb.crimea.ua	United Commercial Bank,
ru@FreeBSD.org		FreeBSD committer,
+380.652.247.647	Simferopol, Ukraine

http://www.FreeBSD.org	The Power To Serve
http://www.oracle.com	Enabling The Information Age


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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