Skip site navigation (1)Skip section navigation (2)
From:      "Dylan A. Loomis" <dylan@aero.org>
To:        Parker Brown <phbrown@gte.net>
Cc:        FreeBSD Questions <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Superuser not permitted to chmod on his own files
Message-ID:  <19990726150915.A11624@rush.aero.org>
In-Reply-To: <379CD428.64C53F37@gte.net>; from Parker Brown on Mon, Jul 26, 1999 at 02:33:28PM -0700
References:  <379CD428.64C53F37@gte.net>

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




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