cancel
Showing results for 
Search instead for 
Did you mean: 

Odd Linux Permissions Problem

csogilvie
Grafter
Posts: 5,852
Registered: 04-04-2007

Odd Linux Permissions Problem

Quote
[root@omega src]# ls -l
total 438086345
drwxrwxr-x 2 cso01 cso01 4096 Apr 5 12:44 CVS/
?r----S--T 2322 2624850197 152409544 0 Oct 19 1974 mailto.php
?rwsr----T 2222 2310 34184 152293576 Oct 30 1974 options.php
?-w-rws--T 2323 3295414546 151791560 151391776 Jan 1 1970 printer_friendly_bottom.php
p--xr-s--- 16393 914884870 151460064 1936288863 Oct 20 1974 read_body.php|
?r-x-w---- 16430 3912777737 146014292 0 Jan 1 1970 redirect.php
?--xrws--T 2210 1414727878 1296153096 144882412 Aug 18 1974 right_main.php
br-sr-srwx 34840 1740666725 152043526 0, 85 Jan 17 09:26 vcard.php
?rw---sr-T 2311 1957693703 152057728 151467932 Oct 20 1974 view_header.php


I've tried as root to remove these files
Quote
[root@omega src]# rm *.php
rm: remove write-protected weird file `mailto.php'? y
rm: cannot remove `mailto.php': Operation not permitted


and I'm now baffled...


Any help/advice?

Quote
[root@omega src]# uname -a
Linux omega 2.4.21-0.13mdk #1 Fri Mar 14 15:08:06 EST 2003 i686 unknown unknown GNU/Linux
7 REPLIES
Community Veteran
Posts: 14,469
Registered: 30-07-2007

Odd Linux Permissions Problem

Looks very much like a corrupted filesystem to me.
- UID & GID are way too big
- ? is invalid in the permissions section (?r----S--T)
- Dates of jan 1 1970 (unix day 0)
- (br-sr-srwx 34840 1740666725 152043526 0, 85 Jan 17 09:26 vcard.php) is showing a major (0) and minor (85) device id instead of a size.
- A filesize of over 1.9GB for one of the files.

Yep, definately a sick puppy there.

You need to run an fsck on the filesystem to clean it up. If this is a mountable filesystem you should unmount it first then run fsck on it.

In it's present state any attempt to delete any files (not just the ones you have listed) may result in further corruption. You may also find after the fsck has run that other files have become corrupted due to lost links and duplicate device nodes and blocks being found.

I hope you had a backup of those files!!!!!!

Cheers

Peter Cool
csogilvie
Grafter
Posts: 5,852
Registered: 04-04-2007

Odd Linux Permissions Problem

Its just a temporary directory used for resolving conflicts with Squirrelmail Devel (I have a few local hacks)

I have run fsck and its done absolutely nothing...

BTW, the files can't possibly be 1.9GB as theres not htat much on the disk Wink
Community Veteran
Posts: 14,469
Registered: 30-07-2007

Odd Linux Permissions Problem

Running fsck on a mounted filesystem may not always fix it and is not recommended anyway, which is why I suggested unmounting it if it's possible. Alternatively force an fsck on bootup which should correct any issues.

What params did you use to perform the fsck? You normally have to specify -a for fix problems but don't do it on a mounted filesystem.

It does need to be run as leaving it as it is is likely to cause further problems/corruptions.

I can't remember how to force a check on reboot, I will have to look it up or a man fsck may give you the answer.
Community Veteran
Posts: 14,469
Registered: 30-07-2007

Odd Linux Permissions Problem

To force an fsck on reboot use shutdown -rF (-r reboot after shutdown complete, -F perform FSCK on startup).
csogilvie
Grafter
Posts: 5,852
Registered: 04-04-2007

Odd Linux Permissions Problem

I think I may have it, I'll let you know in a few minutes Wink
csogilvie
Grafter
Posts: 5,852
Registered: 04-04-2007

Odd Linux Permissions Problem

Working sort of - the files gone - now I just need to work out why things like Apache are not working...
Community Veteran
Posts: 14,469
Registered: 30-07-2007

Odd Linux Permissions Problem

If they are all on the same filesystem then callateral damage may have occured - on rare occations I have known fsck to get things wrong and allocated the wrong blocks to existing files/executables, especially when duplicate blocks were found. Good luck on you hunting.