View previous topic :: View next topic |
Author |
Message |
jaymz Apprentice
Joined: 07 Nov 2002 Posts: 171 Location: /dev/chair
|
Posted: Thu Jan 16, 2003 12:58 pm Post subject: changing a file's ownership |
|
|
well, i have a odd problem with a file....
the owner is a user that doesn't exist and never has existed on my computer.... he doesn't even have a name, just a number 276866986 something like that.... and I can't rid of the file 'cause I don't have the proper rights and I can't change them.... how can I change the owner of this fu**** file? Or if this cannot be done how can I get rid of this file, I can't read, write or even launch if.
This is a file I downloaded, put on another disk when I still had the proper rights. and the re - move to another disk....
I try to add the user 27.... but it seem you can't have such a name.... so no luck
please help me
I hope I was clear enough to make me understand my current issue.... |
|
Back to top |
|
|
pipan n00b
Joined: 04 Oct 2002 Posts: 18 Location: Tällberg, Sweden
|
Posted: Thu Jan 16, 2003 1:04 pm Post subject: |
|
|
su to root and delete it if you dont want to keep it, else you can
Code: | chown user:group /path/to/file |
to change the owner to user and group to group, this must also be done as root |
|
Back to top |
|
|
jaymz Apprentice
Joined: 07 Nov 2002 Posts: 171 Location: /dev/chair
|
Posted: Thu Jan 16, 2003 3:17 pm Post subject: |
|
|
if it was that easy I wouldn't have requested help....
I can't change the ownership, nor the group even when I'm root....
Thanks anyway |
|
Back to top |
|
|
pipan n00b
Joined: 04 Oct 2002 Posts: 18 Location: Tällberg, Sweden
|
Posted: Thu Jan 16, 2003 3:31 pm Post subject: |
|
|
sorry, but its hard to know how much ppl knows =)
Anyway, what filesystem is the file on?
edit: sorry.. but i doesnt matter, i had a wrong idea. Are you sure you didnt accidently mount it read-only? Also try an fsck and check so the filesystem isnt screwed up... i hope you will solve the problem.
Last edited by pipan on Thu Jan 16, 2003 3:36 pm; edited 1 time in total |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
|
Back to top |
|
|
phong Bodhisattva
Joined: 16 Jul 2002 Posts: 778 Location: Michigan - 15 & Ryan
|
Posted: Thu Jan 16, 2003 6:00 pm Post subject: |
|
|
There was a file I couldn't delete no matter what I tried on one of our servers at work. After much fussing I discovered there were some super-secret file attributes I'd never heard of. This particular file had the "immutable" or "i" bit set. See man pages for lsattr and chattr to see if your file is in a similar state. These attributes seem to be ext2/3 specific. _________________ "An empty head is not really empty; it is stuffed with rubbish. Hence the difficulty of forcing anything into an empty head."
-- Eric Hoffer |
|
Back to top |
|
|
jaymz Apprentice
Joined: 07 Nov 2002 Posts: 171 Location: /dev/chair
|
Posted: Thu Jan 16, 2003 9:18 pm Post subject: |
|
|
well doing a fsck on the disk was the key.... even if the file is now lost....
thanks guys |
|
Back to top |
|
|
|