Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Mar 2000 10:35:59 -0600 (CST)
From:      Ryan Thompson <ryan@sasknow.com>
To:        "J. W. Ballantine" <jwb@homer.att.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: root not root??
Message-ID:  <Pine.BSF.4.21.0003011030470.399-100000@stimpy.sasknow.com>
In-Reply-To: <200003011531.KAA09053@akiva.homer.att.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <filename>.  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 <ryan@sasknow.com>
  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




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