Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Ghost File - Cannot Delete
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
ddpruitt
n00b
n00b


Joined: 17 Dec 2002
Posts: 11

PostPosted: Sun Sep 11, 2005 12:20 pm    Post subject: Ghost File - Cannot Delete Reply with quote

I have a file that I cannot delete or change ownership of. I would like to be able to delete the file without having to resort to removing the partition.

When I do ls I see the file:
Code:
msg_reply.gif


When I do ls -la I get:
Code:
ls: msg_reply.gif: Permission denied


When I move up one directory and try to chown -R I get:
Code:
chown: cannot access `img/msg_reply.gif': Permission denied


I'm doing this all as root so I am confused as to why it is not working. I would really like to delete this file as it is burried about nine folders deep in the eGroupware fudforum folder.

Any thoughts?
Back to top
View user's profile Send private message
smerf
l33t
l33t


Joined: 06 Nov 2004
Posts: 778
Location: Polska

PostPosted: Sun Sep 11, 2005 3:11 pm    Post subject: Reply with quote

what fs it is? maybe file is marked immutable?
Code:
lsattr [file]

_________________
Microsoft is not the answer, Microsoft is the question, the answer is no.
Back to top
View user's profile Send private message
ddpruitt
n00b
n00b


Joined: 17 Dec 2002
Posts: 11

PostPosted: Sun Sep 11, 2005 4:50 pm    Post subject: Reply with quote

I am useing reiserfs.

when I lsattr the file I get:
Code:
lsattr: Permission denided while trying to stat msg_reply.gif


I thought root was God a machine, how can it not have permission on a file? :(
Back to top
View user's profile Send private message
smerf
l33t
l33t


Joined: 06 Nov 2004
Posts: 778
Location: Polska

PostPosted: Sun Sep 11, 2005 6:24 pm    Post subject: Reply with quote

root has nearly God power.... but: kernel and modules running kernel mode have much more power
something crashes sometimes, and result in error message which sometimes may sound confusing.

it seems that you have broken filesystem (or even hardware problem), please:

1) try to access the file and check dmesg | tail output
2) unmount affected filesystem unmount [fs_mount_point] and run fsck on appropiate device (if it is your root fs remount it read-only instead of unmounting mount / -o remount,ro, if you get busy message determine processes blocking umount using fuser)
3) execute stat [directory_which_holds_problematic_file] and post the output
_________________
Microsoft is not the answer, Microsoft is the question, the answer is no.
Back to top
View user's profile Send private message
ddpruitt
n00b
n00b


Joined: 17 Dec 2002
Posts: 11

PostPosted: Sun Sep 11, 2005 10:33 pm    Post subject: Reply with quote

I ran the fsck with the --fix-fixable and it removed the problem file.

Thank You very Much!

I seem to have ran into the same problem with some other files now so I am wondering if it is a hardware problem.

I ran the stat on the new problem children and this is what I get:
Code:
  File: `template/'
  Size: 112             Blocks: 1          IO Block: 4096   directory
Device: 2101h/8449d     Inode: 314934      Links: 2
Access: (0775/drwxrwxr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2005-09-04 04:37:04.000000000 -0500
Modify: 2005-09-11 13:53:14.000000000 -0500
Change: 2005-09-11 13:57:09.000000000 -0500


There are two files in this folder and I am getting the same Permission Denied problem. If I can't fix it using the fsck again then I will just drop and recreate the partition.

Thanks again for the help.
Back to top
View user's profile Send private message
smerf
l33t
l33t


Joined: 06 Nov 2004
Posts: 778
Location: Polska

PostPosted: Sun Sep 11, 2005 10:46 pm    Post subject: Reply with quote

What does dmesg say? If it is a hardware problem, kernel should cry about it. You can try using badblocks on suspected device (but, please BE EXTREMELY CAREFULL when using it on existing fs - read manual page before trying). Are you using some extra options (I'm not using reiserfs currently, just guessing) while mounting this partition?

badblocks is a part of e2fsprogs package, maybe there is some similar program designed for reiser, but the only thing we want to check is read/write consistecy, so probably this program will help - however, BE CAREFULL!
_________________
Microsoft is not the answer, Microsoft is the question, the answer is no.
Back to top
View user's profile Send private message
ddpruitt
n00b
n00b


Joined: 17 Dec 2002
Posts: 11

PostPosted: Mon Sep 12, 2005 2:06 am    Post subject: Reply with quote

dmesg doesn't say anything about the drive.

I am mounting the device as /dev/hde1, the entire drive is formatted as reiserfs. I am using it as a backup drive following the instructions found at http://www.mikerubel.org/computers/rsync_snapshots/index.html. It is a procedure to use rsync and cp -al as a rolling backup (just the home directory for now).

The procedure has a step that mounts the device mount -o remount, rw [dev]. Normally it is mounted ro. After various rm's and mv's and cp -al's are ran and the rsync finishes, the device is remounted ro.

Also, the it is mounted to is in the /root (/root/backup). This folder is mounted
Code:
mount -o ro 127.0.0.1:/root/backup /mnt/backup

so that I can let users get read only access to the backup snapshot. The /mnt/backup is a part samba share.
Back to top
View user's profile Send private message
smerf
l33t
l33t


Joined: 06 Nov 2004
Posts: 778
Location: Polska

PostPosted: Mon Sep 12, 2005 8:14 am    Post subject: Reply with quote

seems to be something reiser-specific (and thus i'm not able to help you) or hardware-related. however I will keep thinking about your problem.
_________________
Microsoft is not the answer, Microsoft is the question, the answer is no.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum