Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can't rm a file I own?
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
defunct
n00b
n00b


Joined: 14 Feb 2004
Posts: 29

PostPosted: Mon Sep 20, 2004 3:59 am    Post subject: Can't rm a file I own? Reply with quote

Hello,

I'm using KDevelop to write a program and when I run make distcheck to package it, it creates files that I cannot remove, even though I own them. For example:

Code:

[james@warped:~/work/ksnkauth/ksnkauth-1.0]$ id
uid=1000(james) gid=100(users) groups=100(users),10(wheel)
[james@warped:~/work/ksnkauth/ksnkauth-1.0]$ ls -l AUTHORS
-r--r--r--    1 james    users          41 Sep 19 18:36 AUTHORS
[james@warped:~/work/ksnkauth/ksnkauth-1.0]$ rm AUTHORS
rm: remove write-protected regular file `AUTHORS'? y
rm: cannot remove `AUTHORS': Permission denied
[james@warped:~/work/ksnkauth/ksnkauth-1.0]$ chmod +w AUTHORS
[james@warped:~/work/ksnkauth/ksnkauth-1.0]$ ls -l AUTHORS
-rw-r--r--    1 james    users          41 Sep 19 18:36 AUTHORS
[james@warped:~/work/ksnkauth/ksnkauth-1.0]$ rm AUTHORS
rm: cannot remove `AUTHORS': Permission denied
[james@warped:~/work/ksnkauth/ksnkauth-1.0]$


Does anyone know why I can't remove that file and how I can fix it?

Thanks in advance,
-d
Back to top
View user's profile Send private message
psyqil
Advocate
Advocate


Joined: 26 May 2003
Posts: 2767

PostPosted: Mon Sep 20, 2004 4:16 am    Post subject: Reply with quote

Perhaps there's still something accessing it? Try emerge lsof && lsof AUTHORS
Back to top
View user's profile Send private message
defunct
n00b
n00b


Joined: 14 Feb 2004
Posts: 29

PostPosted: Mon Sep 20, 2004 5:04 am    Post subject: Reply with quote

psyqil wrote:
Perhaps there's still something accessing it? Try emerge lsof && lsof AUTHORS


Hello,

I tried that and lsof returns nothing. No processes own those files.
Back to top
View user's profile Send private message
PowerFactor
Veteran
Veteran


Joined: 30 Jan 2003
Posts: 1693
Location: out of it

PostPosted: Mon Sep 20, 2004 5:30 am    Post subject: Reply with quote

Perhaps they have the immutable attribute set. You can check that with lsattr and change it with chattr.
Back to top
View user's profile Send private message
defunct
n00b
n00b


Joined: 14 Feb 2004
Posts: 29

PostPosted: Mon Sep 20, 2004 5:40 am    Post subject: Reply with quote

PowerFactor wrote:
Perhaps they have the immutable attribute set. You can check that with lsattr and change it with chattr.


Code:

[james@warped:~/work/ksnkauth/ksnkauth-1.0]$ lsattr AUTHORS
------------- AUTHORS


No attributes are set on the file. Oddly, I cannot cp the file either:

Code:

[james@warped:~/work/ksnkauth/ksnkauth-1.0]$ cp AUTHORS AUTHORS.new
cp: cannot create regular file `AUTHORS.new': Permission denied


I'm stumped... =/

edit: FYI, this file resides on an ext3 filesystem
Back to top
View user's profile Send private message
PowerFactor
Veteran
Veteran


Joined: 30 Jan 2003
Posts: 1693
Location: out of it

PostPosted: Mon Sep 20, 2004 5:46 am    Post subject: Reply with quote

What are the permissions on the directory containing the files?
Back to top
View user's profile Send private message
andrew_j_w
Guru
Guru


Joined: 28 Jun 2003
Posts: 534
Location: York, UK

PostPosted: Mon Sep 20, 2004 8:37 am    Post subject: Reply with quote

What permissions do you have on the directory containing AUTHORS?

It sounds to me like you don't have write permission on the directory.

HTH,
Andrew
Back to top
View user's profile Send private message
PowerFactor
Veteran
Veteran


Joined: 30 Jan 2003
Posts: 1693
Location: out of it

PostPosted: Mon Sep 20, 2004 9:26 am    Post subject: Reply with quote

Did you really think my post was that obfuscated? Or did it just not show up in your browser? ;)
Back to top
View user's profile Send private message
andrew_j_w
Guru
Guru


Joined: 28 Jun 2003
Posts: 534
Location: York, UK

PostPosted: Mon Sep 20, 2004 10:14 am    Post subject: Reply with quote

I think I must be going blind in my old age... Sorry! :oops:
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