LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-21-2006, 12:16 PM   #1
windisch
Member
 
Registered: Nov 2004
Location: Gahanna, Ohio, USA
Distribution: Fedora 9
Posts: 158

Rep: Reputation: 30
Fsk messed up permissions on files


Examples:

d--x-w-r-t 2 1194197678 44975707 90112 Jun 5 1971
d-w--wS--- 2 1145962496 462029306 49152 Dec 31 1969

Even with Root, I can not chown, chmod, or remove these files/directories. What do I do to fix this issue?

Thanks,
Adam
 
Old 07-21-2006, 12:26 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
If it's only these, boot a rescue or Live CD and fix it.
 
Old 07-21-2006, 12:31 PM   #3
windisch
Member
 
Registered: Nov 2004
Location: Gahanna, Ohio, USA
Distribution: Fedora 9
Posts: 158

Original Poster
Rep: Reputation: 30
These are the ones that I aware of right now. So only booting into a rescue cd can fix these files?
 
Old 07-21-2006, 12:33 PM   #4
windisch
Member
 
Registered: Nov 2004
Location: Gahanna, Ohio, USA
Distribution: Fedora 9
Posts: 158

Original Poster
Rep: Reputation: 30
I also have a ton of files in lost+found, some of them have the same permission issues. What can I do with these? Anything?

Last edited by windisch; 07-21-2006 at 12:37 PM.
 
Old 07-22-2006, 02:12 PM   #5
windisch
Member
 
Registered: Nov 2004
Location: Gahanna, Ohio, USA
Distribution: Fedora 9
Posts: 158

Original Poster
Rep: Reputation: 30
Even when I boot into a rescue cd, I can not chmod chown or remove the files. Any other ideas?
 
Old 07-23-2006, 05:35 PM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
- what caused this?
- is the partition mounted read-write?
- if it is an ext2/ext3 partition, do files have extended attributes set? (lsattr)
- what is the exact error you get for each of chown/chmod/rm?
 
Old 07-23-2006, 08:05 PM   #7
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 51
this looks like something that I would usually run fsck to fix. but then, you claim that fsck caused it, so I have no idea (maybe run fsck again?)
 
Old 07-24-2006, 06:19 AM   #8
windisch
Member
 
Registered: Nov 2004
Location: Gahanna, Ohio, USA
Distribution: Fedora 9
Posts: 158

Original Poster
Rep: Reputation: 30
The system was running fine, and after a reboot, it kernel wouldn't boot, it kept halting at checking a disk. Eventually, it came up and said I had to run fsk manually. I did, and I had to "fix" files about 1,000 times. After that, I had these files messed up. I could try fdisk again.

It is a ext3 partition, mounted as read/write, not sure about extended attributes.

The exact message is "Operation not permitted".
 
Old 07-24-2006, 08:12 AM   #9
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
The system was running fine, and after a reboot, it kernel wouldn't boot, it kept halting at checking a disk.
*Something* must have happened for this to occur. Errors like these don't pop up all by themselves. If you are sure you did *nothing* (with all due respect but I can't imagine that), do your syslog files hold any clues?

Check the state of the partition with "tune2fs -l /dev/partitiondevicename | grep state:". If it says "clean" then running fsck again should not be necessary.
Check SELinux is disabled setting "selinux=disabled" in /etc/sysconfig/selinux if you boot a SELinux-enabled kernel (or use setenforce 0).
Check extended file attributes with "lsattr".
Check the directory being chowned root first, then chmodded 0700 before you try to delete files inside an unowned directory. If it still gives errors please give output for a single file this way:
ls -alZ filename 2>&1 | tee /tempdir/file.log
lsattr -a filenname 2>&1 | tee -a /tempdir/file.log
stat filename 2>&1 | tee -a /tempdir/file.log

* Since you're running an RPM-based distro we could try to recover files if 0) they are part of a package, and 1) if your RPM databases in /var/lib/rpm are OK and 2) if the files in lost+found are OK. The remainder we can probably recover running "file" and reading them. Start by dumping the contents of the RPM database to file:
"rpm -qa --dump > /tempdir/rpmsums.log". If the subject is a file then the fourth field will be the MD5sum.
Now md5sum the contents of /lost+found: "md5sum /lost+found/* > /tempdir/lostsums.log". If the subject is a file then the second field will be the MD5sum. Now compare for sums and if you have a match you'll have 0) verified the content of the file is unchanged and 1) the name, rights and location. Need a script for it? :-]
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
messed up permissions Smokey Slackware 5 10-29-2004 12:17 PM
I messed up my / permissions np complete Linux - General 4 10-29-2004 08:17 AM
su permissions messed up ceph Linux - General 1 09-08-2004 11:54 PM
Messed up my permissions usercsr Slackware 7 07-08-2004 11:21 AM
I think I messed up my permissions... jeffreybluml Linux - Newbie 4 03-25-2004 06:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:56 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration