This is on a Debian box:

[ampeg]$ ls -la
total 36
dr-xr-xr-x 3 matt pg104272  4096 2011-01-27 10:37 .
drwxr-xr-x 3 matt pg104272  4096 2012-01-04 12:05 ..
-rwxrwxrwx 1 matt pg104272 11290 2012-01-02 06:41 default.settings.php
drwxrwxrwx 2 matt pg104272  4096 2012-01-04 11:56 files
-rwxrwxrwx 1 matt pg104272 10389 2011-01-27 10:34 settings.php
[ampeg]$ rm settings.php
rm: cannot remove `settings.php': Permission denied

I'm logged on as that matt user.

How is it possible that I can't delete that file?

link|improve this question

67% accept rate
sudo rm settings.php – kobaltz Jan 4 at 20:18
You can try using lsattr on that file. – XXL Jan 4 at 20:22
i dont have root access on that machine – clamp Jan 4 at 20:24
[ampeg]$ lsattr settings.php ------------------- settings.php – clamp Jan 4 at 20:24
@clamp: wooh, then i dunno.. read-only filesystem? – XXL Jan 4 at 20:28
show 3 more comments
feedback

1 Answer

up vote 10 down vote accepted

You have no write access on that directory.

dr-xr-xr-x 3 matt pg104272  4096 2011-01-27 10:37 .

You can't delete a file within a directory you don't have write access to. Moreover, quoting the Ubuntu Community manual, "write access for a directory allows deleting of files in the directory even if the user does not have write permissions for the file".

Obtain write privileges, then you're good to go.

link|improve this answer
damn, slhck is absolutely correct, lol.. – XXL Jan 4 at 21:17
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.