Re: Root can't rm or chmod on a directory (not immutable either)



Chris Davies wrote:

Nathan Keel <nat.k@xxxxx> wrote:
Today I had an issue when trying to change the permissions on a
directory. The other day I set the files and the dir itself to chmod
0 (owned by the user) and today I didn't have permission to change it
as
that user. I am the only one on this system and it's not on a
network, so no one changed anything.

Still, I checked the attributes with lsattr and saw nothing set. So,
I su -'ed to root and I couldn't run chmod or rm -rf against the
directory either (permission denied!) /home isn't mounted as read
only or anything else, and the user directory itself is fine (I can
do anything normally as the user (or root) other than to that one
directory giving me the problem).

Sounds like the filesystem's possibly broken. (A very worrying
thought.) I know you wrote that fsck showed no errors, but I didn't
see whether you'd forced fsck to check the filesystem or whether you'd
let it skip the check because it thought it was clean. Boot to
singleuser and try the -f (force) flag.

Yeah, I had done that on boot (forced) and it didn't catch anything.


Anyway, I don't understand what I can do here. The file system is
ext3, this is a CentOS 4.7 Final install with 2.6.9-78.0.13.ELsmp
kernel (not that this should matter beyond ext3).

Actually, before you try the fack, take a look at this,
https://bugzilla.redhat.com/show_bug.cgi?id=164696; is it maybe
related? I do recall getting bitten by a subtle ext3 + RAID + LVM bug
(yes, it only showed up when all three components were in a stack).
Maybe it's time to consider an urgent kernel upgrade?

That seems to be an old bug with an older kernel (and LVM wouldn't apply
in my case). The issue also seems different, because the files in that
directory themselves aren't correct.

Some final questions if none of that is relevant; I'm not sure where
I'm leading with this, so don't worry too much:

* Have you verified the contents of those files in bbb?

Yes, after copying them with root to another directory, they are the
same file sum and work fine. It's just the directory they are in that
I can't move, delete or change the permissions on.

* Since you've copied the files in it, can you delete them?

Yes, if I copy the files to another location (any location at all), I
can delete them (and the directory they are in) without issue. I still
can't move, delete or change the permissions on the bbb directory (nor
can I do any of those things to the files inside of it, of course).

* Can you move the bbb directory itself out of /home/users/nat?

No, it won't move, I can only copy. I've tried all of the normal things
and tried to see what my options are. Still no errors logged, non
about the drives, none about raid or its status, and I even ran a
badblocks check against the /home partition and didn't get any errors
either.

I'm hopeful it's some bug that can be resolved that won't end up being
fs corruption, since this hasn't gotten worse, but something weird
caused it while the system was running normally and without changes, so
I do worry (but I have a complete mirrored backup on my backup drive
and I have a spare drive sitting in the case just ready to be hooked up
when one of these drives does eventually fail). I guess I'll try
booting into another older kernel and maybe force an file system check
again and see what happens. Thanks.
.



Relevant Pages

  • Re: /dev/ttySx problems... solved
    ... and 'chmod o+rw ttyS*' as root? ... I have rebuilt the 2.6.19-rc5 kernel I was using for FC2, ... having to physically swap drives to revert to FC2. ...
    (Fedora)
  • [PATCH 18-rc2] Fix typos in /Documentation : N-P
    ... Again, if you're not gonna do synchronization with disk drives (dang, ... -the kernel. ... There are two options specific to PSX driver portion. ... The driver uses the settings from the EEPROM set in the SCSI BIOS ...
    (Linux-Kernel)
  • Re: disk speed regression kernel 2.6.29 and after
    ... When I installed kernel 2.6.30, ... I currently have 3 hard drives hooked up. ... ACPI: ... CPU: L2 Cache: 512K ...
    (Linux-Kernel)
  • Major SATA / EXT3 Issue?
    ... I am curious if anyone else has had major problems with SATA drives on ... basis for my kernel build and test processes. ... Because I focused on hardware as the reason for the failure I ... # AX.25 network device drivers ...
    (Linux-Kernel)
  • Re: Weird kernel errors
    ... This may be related to the kernel error message: ... >> The second is that my hard disks won't accept DMA enabling, ... No DMA on any of the drives. ... > allotted partitions if they aren't "right"). ...
    (uk.comp.os.linux)

Loading