Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 May 2006 02:16:04 +0200
From:      Mathias Menzel-Nielsen <matze@matzsoft.de>
To:        freebsd questions <freebsd-questions@freebsd.org>
Subject:   Re: cant delete file as root?
Message-ID:  <446BBCC4.3030200@matzsoft.de>
In-Reply-To: <e572718c0605171707i60465cfaq790eb3975986a346@mail.gmail.com>
References:  <446BB484.10900@matzsoft.de> <e572718c0605171707i60465cfaq790eb3975986a346@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Pietro Cerutti wrote:
> On 5/18/06, Mathias Menzel-Nielsen <matze@matzsoft.de> wrote:
>> Hi
>
> Hello,
>
>>
>> Could someone explain me whats going on here?
>
> Who can say...
>
>>
>> 8<--8<
>> hyperkobold# rm -f /lib/libpthread.so.2
>> rm: /lib/libpthread.so.2: Operation not permitted
>>
>> hyperkobold# ls -lah /lib/libpthread.so.2
>> -r--r--r--  1 root  wheel   159K  1 Mai 23:53 /lib/libpthread.so.2
>>
>> hyperkobold# chmod u+rw /lib/libpthread.so.2
>> chmod: /lib/libpthread.so.2: Operation not permitted
>>
>> hyperkobold# stat /lib/libpthread.so.2
>> 103 1012779 -r--r--r-- 1 root wheel 4050520 162688 "May 18 01:36:33
>> 2006" "May  1 23:53:56 2006" "May  1 23:53:56 2006" "May  1 23:53:56
>> 2006" 4096 320 0x20000 /lib/libpthread.so.2
>> 8<--8<
>
> Try:
>
> # chflags nouchg /lib/libpthread.so.2
> # rm /lib/libpthread.so.2
>
> or post the output of
> $ ls -lo /lib/libpthread.so.2
>
>
Wow. immutable flags. cool! :)
chflags noschg /lib/libpthread.so.2  does the trick...

thanks a lot!



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