Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
changing a file's ownership
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
jaymz
Apprentice
Apprentice


Joined: 07 Nov 2002
Posts: 171
Location: /dev/chair

PostPosted: Thu Jan 16, 2003 12:58 pm    Post subject: changing a file's ownership Reply with quote

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
View user's profile Send private message
pipan
n00b
n00b


Joined: 04 Oct 2002
Posts: 18
Location: Tällberg, Sweden

PostPosted: Thu Jan 16, 2003 1:04 pm    Post subject: Reply with quote

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
View user's profile Send private message
jaymz
Apprentice
Apprentice


Joined: 07 Nov 2002
Posts: 171
Location: /dev/chair

PostPosted: Thu Jan 16, 2003 3:17 pm    Post subject: Reply with quote

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
View user's profile Send private message
pipan
n00b
n00b


Joined: 04 Oct 2002
Posts: 18
Location: Tällberg, Sweden

PostPosted: Thu Jan 16, 2003 3:31 pm    Post subject: Reply with quote

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
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Thu Jan 16, 2003 3:36 pm    Post subject: Reply with quote

Anything in can't rm file (even as root) help?
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
phong
Bodhisattva
Bodhisattva


Joined: 16 Jul 2002
Posts: 778
Location: Michigan - 15 & Ryan

PostPosted: Thu Jan 16, 2003 6:00 pm    Post subject: Reply with quote

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
View user's profile Send private message
jaymz
Apprentice
Apprentice


Joined: 07 Nov 2002
Posts: 171
Location: /dev/chair

PostPosted: Thu Jan 16, 2003 9:18 pm    Post subject: Reply with quote

well doing a fsck on the disk was the key.... even if the file is now lost....

thanks guys
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