LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 06-19-2007, 05:44 AM   #1
k0nsole.c
LQ Newbie
 
Registered: Jun 2007
Posts: 8

Rep: Reputation: 0
Unhappy cannot delete or modify the file


HI

I have a problem dealing with the file, 11GB in size. I login as root and tried to delete, it said permission denied.
I tried to rename, permission denied.
I tried to cp /dev/null > filename, permission denied.
I tried to touch, permission denied.

The file is under a folder and I tried to remove the folder, permission denied.
I tried to chmod the file, permission denied.
I am already root.

Pls advise.
I am having headache because of the problem. The script to clean up the old file performed failed because of that file.
 
Old 06-19-2007, 05:56 AM   #2
atulsvasu
Member
 
Registered: Apr 2006
Distribution: Gentoo
Posts: 49

Rep: Reputation: 15
Get ls -l on that file, may be ls -i also.
 
Old 06-19-2007, 05:57 AM   #3
Centinul
Member
 
Registered: Jun 2005
Distribution: Gentoo
Posts: 552

Rep: Reputation: 30
can you give us the 'ls -l' of the file in question? That way we can at least see what permissions are assigned to it.

HTH,

Centinul
 
Old 06-21-2007, 06:25 AM   #4
k0nsole.c
LQ Newbie
 
Registered: Jun 2007
Posts: 8

Original Poster
Rep: Reputation: 0
I tried ls -i also, the file was not chattr before and no i flag was set.

Anyway, I will tell the story. I have some scripts running to remove old backup files in local harddisk. The files are about 10GB in size. I have alert from scripts for failure to remove the backup files and failure to tar the new backup. So I login as root and remove manually. The files are not able to removed and its folder attribute is also cannot be changed. I suspected harddisk had some problem, probably bad sector due to everyday write/erase 10GB files.

I booted up to single user mode and deleted the files, still unsuccessful. I ran fsck and encountered alot of error messages, while trying to fix the errors, system just hang. I hard rebooted the system, the system startedup but hang at "red hat nash version 2.6.1.4 starting.."
I tried to reboot into single user mode again, but hang at same stage.
I thought os corrupted or file system corrupted.
I replaced the harddisk and reinstalled the os.

But I still want to know the possible cause of this.
is that harddisk corrupts and making errors to file modification in first place?
is that fsck corrupted the file system?
how to recover the system hang at "red hat nash version 2.6.1.4 starting "
I want to know for my knowledge and sharing to other users who might have encountered same problem.

My os is centos 4.3
Hardware is HP prolient server.
HDDs are running raid 5.

thanks.

Last edited by k0nsole.c; 06-21-2007 at 06:27 AM.
 
Old 06-22-2007, 03:28 AM   #5
atulsvasu
Member
 
Registered: Apr 2006
Distribution: Gentoo
Posts: 49

Rep: Reputation: 15
You are not posting ls -l of that file!!!

It may be due to permission of parent directory if you can't
even put ls.

Post ls -l for every directory in parent chain.
 
Old 06-22-2007, 10:08 AM   #6
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
Assuming the problem disappeared, its probably a random freak occurrence, no need to spend time wondering. Still, fsck can corrupt file systems, if they are in active use (it should warn you to umount the file systems prior to running fsck). As for the original problem, perhaps a Selinux policy was misplaced or file system corruption got it? Who knows.
 
Old 06-25-2007, 09:03 PM   #7
k0nsole.c
LQ Newbie
 
Registered: Jun 2007
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by atulsvasu
You are not posting ls -l of that file!!!

It may be due to permission of parent directory if you can't
even put ls.

Post ls -l for every directory in parent chain.

I told ya. not possible to post the ls output, we replaced the harddisk, cannot afford to give downtime. The permission of the parent directory is drwxr-xr-x, But I could not chmod 777 to the folder also. Anyway, we had done with the problem already. Thanks for your concern.

Last edited by k0nsole.c; 06-25-2007 at 09:16 PM.
 
Old 06-25-2007, 09:07 PM   #8
k0nsole.c
LQ Newbie
 
Registered: Jun 2007
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by SciYro
Assuming the problem disappeared, its probably a random freak occurrence, no need to spend time wondering. Still, fsck can corrupt file systems, if they are in active use (it should warn you to umount the file systems prior to running fsck). As for the original problem, perhaps a Selinux policy was misplaced or file system corruption got it? Who knows.
Thanks SciYro. I just wondered what could be the problem. Yes it did warn fsck would corrupt the file system, but my stubborn mind went ahead. We suspected the harddisk corrupted initially and fsck made the file system corruption. Thanks again
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot modify, delete, or format free partition Lizardboy74 Linux - Hardware 1 01-22-2007 01:57 PM
Where do I add/delete/modify 'environment variables'? hello321_1999 Linux - Newbie 3 05-03-2006 11:41 AM
How to modify a file? kornerr Programming 4 08-08-2005 09:08 AM
Tried to delete file as root but it says I don't have permission to delete it! beejayzed Mandriva 23 03-12-2004 02:46 AM
modify file access & modify timestamps i2itstud Linux - General 1 05-20-2003 03:34 AM


All times are GMT -5. The time now is 03:53 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration