View previous topic :: View next topic |
Author |
Message |
defunct n00b
Joined: 14 Feb 2004 Posts: 29
|
Posted: Mon Sep 20, 2004 3:59 am Post subject: Can't rm a file I own? |
|
|
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 |
|
|
psyqil Advocate
Joined: 26 May 2003 Posts: 2767
|
Posted: Mon Sep 20, 2004 4:16 am Post subject: |
|
|
Perhaps there's still something accessing it? Try emerge lsof && lsof AUTHORS |
|
Back to top |
|
|
defunct n00b
Joined: 14 Feb 2004 Posts: 29
|
Posted: Mon Sep 20, 2004 5:04 am Post subject: |
|
|
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 |
|
|
PowerFactor Veteran
Joined: 30 Jan 2003 Posts: 1693 Location: out of it
|
Posted: Mon Sep 20, 2004 5:30 am Post subject: |
|
|
Perhaps they have the immutable attribute set. You can check that with lsattr and change it with chattr. |
|
Back to top |
|
|
defunct n00b
Joined: 14 Feb 2004 Posts: 29
|
Posted: Mon Sep 20, 2004 5:40 am Post subject: |
|
|
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 |
|
|
PowerFactor Veteran
Joined: 30 Jan 2003 Posts: 1693 Location: out of it
|
Posted: Mon Sep 20, 2004 5:46 am Post subject: |
|
|
What are the permissions on the directory containing the files? |
|
Back to top |
|
|
andrew_j_w Guru
Joined: 28 Jun 2003 Posts: 534 Location: York, UK
|
Posted: Mon Sep 20, 2004 8:37 am Post subject: |
|
|
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 |
|
|
PowerFactor Veteran
Joined: 30 Jan 2003 Posts: 1693 Location: out of it
|
Posted: Mon Sep 20, 2004 9:26 am Post subject: |
|
|
Did you really think my post was that obfuscated? Or did it just not show up in your browser? |
|
Back to top |
|
|
andrew_j_w Guru
Joined: 28 Jun 2003 Posts: 534 Location: York, UK
|
Posted: Mon Sep 20, 2004 10:14 am Post subject: |
|
|
I think I must be going blind in my old age... Sorry! |
|
Back to top |
|
|
|