From owner-freebsd-questions Wed Mar 1 8:35:40 2000 Delivered-To: freebsd-questions@freebsd.org Received: from stimpy.sasknow.com (h139-142-245-100.ss.fiberone.net [139.142.245.100]) by hub.freebsd.org (Postfix) with ESMTP id D19FC37C355 for ; Wed, 1 Mar 2000 08:35:32 -0800 (PST) (envelope-from ryan@sasknow.com) Received: from localhost (ryan@localhost) by stimpy.sasknow.com (8.9.3/8.9.3) with ESMTP id KAA00492; Wed, 1 Mar 2000 10:35:59 -0600 (CST) (envelope-from ryan@sasknow.com) Date: Wed, 1 Mar 2000 10:35:59 -0600 (CST) From: Ryan Thompson To: "J. W. Ballantine" Cc: freebsd-questions@FreeBSD.ORG Subject: Re: root not root?? In-Reply-To: <200003011531.KAA09053@akiva.homer.att.com> Message-ID: Organization: SaskNow Technologies [www.sasknow.com] MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG J. W. Ballantine wrote to freebsd-questions@FreeBSD.ORG: > > Hi all, > > I'm running 3.4-STABLE #4. > > I have a partition that originally was mounted as /usr. But when I added > another disk, in order to get more space I created another partition for > /usr and I'm now mounting the old usr part. on another mount point (/foo). > > Now I want to use the space on /foo, so I'm trying to rm all the old files, > but there are some that are r-sr-xr-x that I can't rm. When I become root, > either via, logging in as root or booting in single user mode, and I > try to chmod u-s file, I get the message Operation not permitted. > > What do I have to do, short of reformating the part., to rm these files?? Is the filesystem read-only? You may get a "Read-only filesystem", or perhaps that "Operation not permitted" applies, here. If it IS read only, mount -u -w /dev/aoeu /foo. If the system securelevel has been set (check with sysctl kern.securelevel), flags will be enforced, even for root. Check flags with ls -lof . If there are any flags associated, such as schg, you will not be able to modify the file without resetting them. If your securelevel IS set, you will have to boot into single user mode and reduce the securelevel to 0 or -1 before you can reset flags. (the securelevel can be found in rc.conf) To remove flags, use the chflags command and prefix the offending flag with "no". For example: # chflags noschg offending.file .. to remove the system immutable flag. -- Ryan Thompson Systems Administrator, Accounts Phone: +1 (306) 664-1161 SaskNow Technologies http://www.sasknow.com #106-380 3120 8th St E Saskatoon, SK S7H 0W2 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message