# admin has no permission to empty trash



## bossa nova (Jul 22, 2003)

I am getting the message that the trash can not be emptied because the user doesn't have permission-BUT this is an account that has admin priviledges. What can I do to fix it. I have already run disk repair/fix permissions. Any suggestions?


----------



## RPS (Jul 22, 2003)

A couple of other people here have also had this problem. I suggest always searching before you post. In this case, search for "trash AND permission" and I think you'll be doing fine.


----------



## bossa nova (Jul 22, 2003)

RPS...thanks for your suggestion. Actually I did that. What I neglected to note was that this is not like the usual stubborn undeletable file. (Which would be very easy to find on a lot of forums) Here is the error I am getting. Note the user id number included with the error. When I have seen this before there was no id included. So I was thinking this would qualify for a new post.

"The operation could not be completed because you do not have sufficient priveledge for 501"

So again I ask has anyone seen this?


----------



## Eckhart (Jul 22, 2003)

Why don't you give us an *ls -la ~/.Trash/* aswell as your uid and gid.

Or simply try to force delete any contents of your Trash: "sudo rm -rf ~/.Trash/*"

If it's a problem of priveledges it mostly can't be too hard, can it?


----------



## bossa nova (Jul 23, 2003)

Ok here we go.

[My-Computer:~] Me% ls -la ~/.Trash/
total 688
drwx------   4 Me  staff     136 Jul 23 10:04 .
drwxr-xr-x  14 Me  staff     476 Jul  3 12:26 ..
-rwx------   1 Me  staff    6148 Jun 26 11:59 .DS_Store
-rw-r--r--   1 Me  staff  342876 Jul 23 10:04 example.doc

uid = me/501, gid = staff.


----------



## slur (Aug 5, 2003)

I keep a script around for those odd occasions when the trash won't empty, either because of a permissions problem or because the file has its "immutable" flags set. I call it "nuke":

*#!/bin/sh
chflags -R nouchg,noschg ~/.Trash/*
rm -rf ~/.Trash/**

I keep it in my ~/bin folder where I can use sudo to invoke it fro the Terminal. Never fails.

*sudo nuke*


----------



## Arden (Aug 5, 2003)

Ka-boom!

As hulk might say...


----------

