An invincible file

Tyler Aviss tjaviss-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Fri Mar 18 18:11:52 UTC 2011


On Fri, Mar 18, 2011 at 11:08 AM, Tyler Aviss <tjaviss-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org> wrote:
> On Fri, Mar 18, 2011 at 10:49 AM, Dave Germiquet
> <davegermiquet-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org> wrote:
>> Did you try chmod 777 config.xml ?
>>
>> I think its possible to make the file chmod 000 config.xml as root and fix
>> it with root again by chmod 777 config.xml?
>>
>>
>> On Fri, Mar 18, 2011 at 1:43 PM, William Park <opengeometry-FFYn/CNdgSA at public.gmane.org> wrote:
>>>
>>> On Fri, Mar 18, 2011 at 12:41:24PM -0400, Lennart Sorensen wrote:
>>> > On Fri, Mar 18, 2011 at 09:31:09AM -0700, Tyler Aviss wrote:
>>> > > I've got a file that for some reasons seems semi-invincible. Here's a
>>> > > quick overview (we'll call the file /opt/data/.config.xml).
>>> > > a) root # ls -ld .config.xml
>>> > > -rw-r--r-- 1 root root 4050 Mar 18 08:07 .config.xml
>>> > >
>>> > > b) root # ls -ld /opt/data
>>> > > drwxr-xr-x 8 root root 4096 Oct  4 13:43 /opt/data/
>>> > >
>>> > > c) Unmounted /opt, fsck'ed, and there are no visible FS errors
>>> > >
>>> > > d) root # lsattr .config.xml
>>> > > ------------- .config.xml
>>> > >
>>> > > e) root  # mount | grep opt
>>> > > /dev/sda3 on /opt type ext3 (rw)
>>> > >
>>> > >
>>> > > The file cannot be renamed or deleted. The contents *can* be edited.
>>> > > The filesystem isn't readonly, The file isn't undeletable/immutable.
>>> > > The user is root
>>> > >
>>> > >
>>> > > Any ideas
>>> >
>>> > Time for an fsck.  You may have a corrupt directory, which could cause
>>> > that behaviour.
>>>
>>> But, he already did that.  I would've guessed 'lsattr', but that's clean
>>> too.
>>> --
>>> William
>>> --
>>> The Toronto Linux Users Group.      Meetings: http://gtalug.org/
>>> TLUG requests: Linux topics, No HTML, wrap text below 80 columns
>>> How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
>>
>>
>>
>> --
>>
>>
>>
>> Dave Germiquet
>>
>>
>
>
> Changing the file permissions make little difference (though I can, in
> fact, do so without any errors). As root, one should be able to delete
> the fail regardless of the permissions (exempting certain "attributes"
> of which it has none).
>
> As mentioned by William, I had also already umounted and fsck'ed the
> filesystem, which had no errors.
>
> I've even rebooted the box, but the file is still stuck like glue.
>
>
> "Computers don't make mistakes. They can, however, execute those
> provided to them very quickly"
>


Got it... the directory itself was somehow immutable. I didn't even
realize this was possible, as chattr(1) only mentions files having the
immutable attribute.




-- 
Tyler Aviss
Systems Support
LPIC/LPIC-2/DCTS/CLA

"Computers don't make mistakes. They can, however, execute those
provided to them very quickly"
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list