From owner-freebsd-questions Mon Jul 26 15:10:47 1999 Delivered-To: freebsd-questions@freebsd.org Received: from aero.org (aero.org [130.221.16.2]) by hub.freebsd.org (Postfix) with ESMTP id AEFD51512A for ; Mon, 26 Jul 1999 15:10:42 -0700 (PDT) (envelope-from dylan@rush.aero.org) Received: from rush.aero.org ([130.221.201.83]) by aero.org with ESMTP id <111174-1>; Mon, 26 Jul 1999 15:09:19 -0700 Received: (from dylan@localhost) by rush.aero.org (8.9.3/8.9.3) id PAA24662; Mon, 26 Jul 1999 15:09:16 -0700 (PDT) Date: Mon, 26 Jul 1999 15:09:16 -0700 From: "Dylan A. Loomis" To: Parker Brown Cc: FreeBSD Questions Subject: Re: Superuser not permitted to chmod on his own files Message-ID: <19990726150915.A11624@rush.aero.org> References: <379CD428.64C53F37@gte.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.5i In-Reply-To: <379CD428.64C53F37@gte.net>; from Parker Brown on Mon, Jul 26, 1999 at 02:33:28PM -0700 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Parker, FreeBSD has file flags that can be set so that no one, not even root can modify the file. This so that if you are running in a high enough secure level even if you get rooted at least they can't modify these protected files /kernel is one of these for obvious reasons. So check out the man page for the chflags(1) command as it will give you the skinny. Basically probably the flag you are having problems with is 'schg - set the system immutable flag' you can see file flags by using the -o option with ls e.g. ls -lo /kernel -rwxr-xr-x 1 root wheel schg 2187304 Jun 4 11:04 kernel* Most likely when you built the kernel you used 'make install' it automatically takes care of removing, then replaceing the file flags. Do a 'make -n install' and you'll see the calls to chflags. Hope that helps out. -DAL- On Mon, Jul 26, 1999 at 02:33:28PM -0700, Parker Brown wrote: > I'm trying some changes to get FreeBSD to recognise my sound board, and > I don't want to leave the kernel I just built as the default. I leave > /kernel.GENERIC in place but I wanted to delete the new /kernel and > rename /kernel.old to /kernel, in other words get rid of the newly built > kernel. > All three of the files are 555 root wheel, as they should be, but I > can't delete /kernel. I even tried to chmod o+w /kernel but I get a > message that it is not allowed! And as root, I OWN the **** thing! > Why is this happening, and how can I get around it? I was able to do > this very operation the last time I rebuilt the kernel on this same > release. What is happening? > > PB > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message -- Dylan A. Loomis Computer Systems Research Department The Aerospace Corporation e-mail: dylan@aero.org phone: (310) 336-2449 PGP Key fingerprint = 55 DE BB DD 34 10 CD 20 72 79 88 FE 02 0E 21 3A PGP 2.6.2 key available upon request To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message