Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Empty Trash - Sufficient Privileges - help!

Empty Trash - Sufficient Privileges - help!
Thread Tools
Woody
Junior Member
Join Date: Sep 2000
Location: Madison, CT
Status: Offline
Reply With Quote
Jan 3, 2003, 11:51 AM
 
I have this empty folder which I can rename but not delete - "do not have sufficient privileges"

I guess some of the invisible items need permissions changed.

I have tried the delete in BatchMod with no success, but have not tried using it beyond that.
Logged in as root and in root, the trash folder is empty.

Can anybody please assist. Gettting the error message every time I empty is getting a bit tedious.

TIA
     
Scifience
Mac Elite
Join Date: Aug 2002
Location: Kyoto, Japan
Status: Offline
Reply With Quote
Jan 3, 2003, 12:23 PM
 
Using your main account, move the folder out of the trash. Then, login as root and delete it - you can do anything then. Do a search on Apple's site for how to enable the root user.
     
Scifience
Mac Elite
Join Date: Aug 2002
Location: Kyoto, Japan
Status: Offline
Reply With Quote
Jan 3, 2003, 12:25 PM
 
Login as root - you can do anything then. Do a search on Apple's site for how to enable the root user.
     
Woody  (op)
Junior Member
Join Date: Sep 2000
Location: Madison, CT
Status: Offline
Reply With Quote
Jan 3, 2003, 12:40 PM
 
Originally posted by Scifience:
Login as root - you can do anything then. Do a search on Apple's site for how to enable the root user.
Hello
Sorry I was not clearer in my previous post.

In Root the trash is empty!

Additionally, logged in as my main account, this folder when moved out of the trash cannot be seen on the desktop AND remains in the trash.

please help
     
schep
Mac Enthusiast
Join Date: Apr 2002
Location: sc aka hell
Status: Offline
Reply With Quote
Jan 3, 2003, 12:51 PM
 
sudo rm <drag and drop the file here><hit enter>
     
pat++
Mac Elite
Join Date: May 2001
Location: Earth
Status: Offline
Reply With Quote
Jan 3, 2003, 12:57 PM
 
See if the item is not locked (cmd-I to get info)
     
Woody  (op)
Junior Member
Join Date: Sep 2000
Location: Madison, CT
Status: Offline
Reply With Quote
Jan 3, 2003, 01:13 PM
 
If I do the sudo rm command, I get the message that it is a directory.
Within the directory, no visible files.

Additionally, Folder is not locked.

Thanks
     
pat++
Mac Elite
Join Date: May 2001
Location: Earth
Status: Offline
Reply With Quote
Jan 3, 2003, 02:28 PM
 
Originally posted by Woody:
If I do the sudo rm command, I get the message that it is a directory.
Within the directory, no visible files.

Additionally, Folder is not locked.

Thanks
use this to delete the folder :

sudo rm -rf <drag&drop folder>
     
Woody  (op)
Junior Member
Join Date: Sep 2000
Location: Madison, CT
Status: Offline
Reply With Quote
Jan 3, 2003, 03:25 PM
 
O.K, almost there, the folder has some invisible contents. How do I delete those files?
The command to delete the folder works but I get the message that the folder is not empty.
How do I do a sudo rm for those files I can't see?

Thanks
     
normyzo
Dedicated MacNNer
Join Date: Oct 1999
Status: Offline
Reply With Quote
Jan 3, 2003, 03:32 PM
 
Originally posted by Woody:
O.K, almost there, the folder has some invisible contents. How do I delete those files?
The command to delete the folder works but I get the message that the folder is not empty.
How do I do a sudo rm for those files I can't see?

Thanks
As posted above: use "sudo rm -rf <drag&drop here>" and hit enter. The "-rf" makes it a recursive delete (r) and doesn't ask for confirmation of deletion (f). This will kill the whole folder and everything in it.

Dan
     
Woody  (op)
Junior Member
Join Date: Sep 2000
Location: Madison, CT
Status: Offline
Reply With Quote
Jan 3, 2003, 03:38 PM
 
Originally posted by normyzo:
As posted above: use "sudo rm -rf <drag&drop here>" and hit enter. The "-rf" makes it a recursive delete (r) and doesn't ask for confirmation of deletion (f). This will kill the whole folder and everything in it.

Dan

Thank you again for continuing help. Here is the error message in Terminal
     
Woody  (op)
Junior Member
Join Date: Sep 2000
Location: Madison, CT
Status: Offline
Reply With Quote
Jan 3, 2003, 03:39 PM
 
Thank you again for continuing help. Here is the error message in Terminal
using sudo rm -rf

HFS+ Private Data: Operation Not Permitted
Directory Not Empty

Ani ideas?
( Last edited by Woody; Jan 3, 2003 at 03:44 PM. )
     
Woody  (op)
Junior Member
Join Date: Sep 2000
Location: Madison, CT
Status: Offline
Reply With Quote
Jan 3, 2003, 05:07 PM
 
I know this can be done. Is there a Unix genius that can help. The folder remains undeleted with invisible files within.

................."My kingdom for some empty trash!"
     
Person Man
Professional Poster
Join Date: Jun 2001
Location: Northwest Ohio
Status: Offline
Reply With Quote
Jan 4, 2003, 01:04 AM
 
Originally posted by Woody:
Thank you again for continuing help. Here is the error message in Terminal
using sudo rm -rf

HFS+ Private Data: Operation Not Permitted
Directory Not Empty

Ani ideas?
HFS+ Private Data is a folder that must be present at least somewhere on the hard drive. Normally it is at the root level directory (i.e. the main directory, "/") I'm not exactly sure, but I know it MUST NOT BE DELETED! I believe it contains important data about the structure of the disk. Normally the folder itself should be invisible, as well.

The reason that it is not in the trash when you are logged in as root is that each user has their own trash can, instead of there being more than one.

The folder should be moved out of the trash in your usual account and put back in place, and then you should use a utility to make it invisible again.
     
Woody  (op)
Junior Member
Join Date: Sep 2000
Location: Madison, CT
Status: Offline
Reply With Quote
Jan 4, 2003, 08:26 AM
 
I can't get this folder out of the trash.

When I attempt to move it, I get a message stating that "one or more items can't be read. Do you want to copy the itemsyou can read?"

The only option is to say "yes"

at that point, the folder remains in the trash.

So at this point, I'm just looking to get these items out and not delete them.

Thanks
     
Simon
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status: Offline
Reply With Quote
Jan 4, 2003, 08:29 AM
 
Try this in the terminal:

sudo rm -rf /Users/<your_account_name>/.Trash

This should delete the obnoxious stuff. The (invisible) .Trash directory will be re-created when you put something into the trah the next time.
     
Woody  (op)
Junior Member
Join Date: Sep 2000
Location: Madison, CT
Status: Offline
Reply With Quote
Jan 4, 2003, 08:57 AM
 
Originally posted by Simon:
Try this in the terminal:

sudo rm -rf /Users/<your_account_name>/.Trash

This should delete the obnoxious stuff. The (invisible) .Trash directory will be re-created when you put something into the trah the next time.

Thank you for your help.

Unfortunately, the empty folder is still there after executing the above command.

Any idea how to move it out permanently?
     
Person Man
Professional Poster
Join Date: Jun 2001
Location: Northwest Ohio
Status: Offline
Reply With Quote
Jan 4, 2003, 11:41 AM
 
Originally posted by Woody:
Thank you for your help.

Unfortunately, the empty folder is still there after executing the above command.

Any idea how to move it out permanently?
Do not use the "rm" command... that will just delete it. You don't want to delete the file. Just move it.

try using "sudo mv (drag file from trash to terminal window) /"

the command will look something like this before it runs:

sudo mv /Users/<username>/.Trash/HFS+\ Private\ Data /

See if that helps.
     
Woody  (op)
Junior Member
Join Date: Sep 2000
Location: Madison, CT
Status: Offline
Reply With Quote
Jan 4, 2003, 12:30 PM
 
Originally posted by Person Man:
Do not use the "rm" command... that will just delete it. You don't want to delete the file. Just move it.

try using "sudo mv (drag file from trash to terminal window) /"

the command will look something like this before it runs:

sudo mv /Users/<username>/.Trash/HFS+\ Private\ Data /

See if that helps.
OK, I was able to move the folder into the Terminal window
/Volumes/Maxtor\ 10\ gig/.Trashes/501/x

Folder is called X

But then it asks
usage: mv [-fi] source target
mv [-fi] source ... directory

What do I do next?
     
drewm
Fresh-Faced Recruit
Join Date: Mar 2002
Location: maryland, USA
Status: Offline
Reply With Quote
Jan 4, 2003, 12:37 PM
 
Boot into 9 and do a Sherlock search for invisibles and delete it there.
     
Woody  (op)
Junior Member
Join Date: Sep 2000
Location: Madison, CT
Status: Offline
Reply With Quote
Jan 4, 2003, 12:46 PM
 
Originally posted by drewm:
Boot into 9 and do a Sherlock search for invisibles and delete it there.
How do I know what the files are? And, what is the path in OSX for the trash and contents within?
     
TheIceMan
Mac Elite
Join Date: Dec 2002
Location: Trapped in the depths of my mind
Status: Offline
Reply With Quote
Jan 4, 2003, 01:20 PM
 
WOODY: Don't know if anyone has suggested this. But may be worth a try if you have not done so. When the "empty folder" is viewed as an icon or list, try Ctrl-Click (or Right-click) on it and go to "Get info". Now click on "Ownership & Permissions." Then make sure that ownership is "(your name)(me)". Then just close that window. Now try to delete it. Maybe that might help.
     
Woody  (op)
Junior Member
Join Date: Sep 2000
Location: Madison, CT
Status: Offline
Reply With Quote
Jan 4, 2003, 03:17 PM
 
Originally posted by TheIceMan:
WOODY: Don't know if anyone has suggested this. But may be worth a try if you have not done so. When the "empty folder" is viewed as an icon or list, try Ctrl-Click (or Right-click) on it and go to "Get info". Now click on "Ownership & Permissions." Then make sure that ownership is "(your name)(me)". Then just close that window. Now try to delete it. Maybe that might help.
I had done some searching on the Forums for people with similar problems. I have checked into ownership and indeed it is owned by Me.

Still unable to deletw the folder or move it out of the trash.
     
jmiddel
Grizzled Veteran
Join Date: Dec 2001
Location: Land of Enchantment
Status: Offline
Reply With Quote
Jan 4, 2003, 07:04 PM
 
Hi,
Have you have run apples repair privs utility?
Working from /Users you should not have to deal with the .Trashes folder, which on my system is located: HardDrive/.Trashes. Next down the line come HD/root/.Trash, then: HD/Users/username/.Trash.
Some questions, what could have caused your user account to have to deal with a folder that doesn't belong there? Have you run fsck -y in single user mode (reboot and command-s). Do you have acccess to DiskWarrior? If so run it, this might involve directory data, never a pleasant prospect.
Good wishes!
     
Woody  (op)
Junior Member
Join Date: Sep 2000
Location: Madison, CT
Status: Offline
Reply With Quote
Jan 4, 2003, 08:39 PM
 
Originally posted by jmiddel:
Hi,
Have you have run apples repair privs utility?
Working from /Users you should not have to deal with the .Trashes folder, which on my system is located: HardDrive/.Trashes. Next down the line come HD/root/.Trash, then: HD/Users/username/.Trash.
Some questions, what could have caused your user account to have to deal with a folder that doesn't belong there? Have you run fsck -y in single user mode (reboot and command-s). Do you have acccess to DiskWarrior? If so run it, this might involve directory data, never a pleasant prospect.
Good wishes!
Thanks for your help.

Ran DiskWarrior
Repaired Privledges
Ran fsck-y - disk OK

Empty folder still in trash and can't be moved.
     
voodoo
Posting Junkie
Join Date: Mar 2001
Location: Salamanca, España
Status: Offline
Reply With Quote
Jan 4, 2003, 09:05 PM
 
Originally posted by Woody:
Thank you for your help.

Unfortunately, the empty folder is still there after executing the above command.

Any idea how to move it out permanently?
If you executed rm -r ~/.Trash then you have deleted that folder and all its contents. Anything that was in the .Trash does not exist anymore.

Your folder must not have been in ~/.Trash then. Do you know its location?

I repeat. If you have executed the rm command on that folder it is gone. No matter what the OS tells you now.
I could take Sean Connery in a fight... I could definitely take him.
     
Person Man
Professional Poster
Join Date: Jun 2001
Location: Northwest Ohio
Status: Offline
Reply With Quote
Jan 5, 2003, 02:58 PM
 
Well, I think the problem has been solved.

Woody and I spent an hour (in iChat) trying various things in the terminal, and I found out that the HFS+ Private Data folder was in the trash on one of his partitions... the operating system wouldn't let us do anything with that folder no matter what we tried (even as root using sudo).

Since it is a separate partition, he is going to copy all the files from it and reformat it... which should work.

Reformatting is always good for hard drive gremlins...

Do let us know if it worked, woody.

Person Man
     
Woody  (op)
Junior Member
Join Date: Sep 2000
Location: Madison, CT
Status: Offline
Reply With Quote
Jan 5, 2003, 05:52 PM
 
Originally posted by Person Man:
Well, I think the problem has been solved.

Woody and I spent an hour (in iChat) trying various things in the terminal, and I found out that the HFS+ Private Data folder was in the trash on one of his partitions... the operating system wouldn't let us do anything with that folder no matter what we tried (even as root using sudo).

Since it is a separate partition, he is going to copy all the files from it and reformat it... which should work.

Reformatting is always good for hard drive gremlins...

Do let us know if it worked, woody.

Person Man

Person Man was gracious enough to help me with his Unix wizardry. Unfortunately, the Dark Lord of the Unix box prevented us from destroying the "one folder" to rule them all.

With Person Man's help and Disk Utility, the folder was cast into Mt. Doom when disk was reformatted.

My Trash Basket is empy!
     
Simon
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status: Offline
Reply With Quote
Jan 6, 2003, 06:20 AM
 
Originally posted by Woody:
My Trash Basket is empy!
Woody, nice to hear that you finally got rid of that sucker.

In case this happens again or for any other users here, I had another idea. When you pulled that obnoxious folder into the terminal you got its path. In Woody's case that was

/Volumes/Maxtor\ 10\ gig/.Trashes/501/x

Note that path and reboot in OS 9. This OS doesn't have a UNIX core and doesn't care about all the UNIX permissions that files have. That's why it's easier for not so UNIX-savvy users to delete things here.

Take the noted path and look at it. It tells us where the thing we want to delete is. /Volumes/ tells us that it is not on the same partition as the OS X system, since in that case it would have been a path like /.Trashes - whenever /Volumes/ is around we have to start looking at other partitions or disks. Next the Maxtor/ tells us which partition we have to look at. So in OS 9 we open the partition Maxtor with a double-click. From now on we just have to keep openning up windows as we go down the path hierarchy. Every time we see a / we know this means another double-cklick. So, in Woody's case, in Maxtor we will double-click 10 and in 10 we will double-click gig and finally we should see .Trashes where we can do a last double-click. We should now see a folder called 501.

The folder is called 501 because that's a user number (in UNIX systems the user names correspond to a user number which is the object the system actually uses to allocate files to a certain user) and because this is not the user's personal trash folder, but the user's trash folder on another partition than the OS is running from (i.e. the partition Maxtor). All the user's trashes for files they delete on non-OS partitions are located in .Trashes directories on the respective partitions.

Now, Woody could have just taken this folder "501" an pulled it onto the trash and emptied it. This should have killed the folder. When Woody goes back to OS X he should no longer see this obnoxious guy in his OS X user trash.

However, there could be problems. But they can also be solved:

- It could happen that the folder you want to delete while in OS 9 has the HFS+ "locked" attribute set. Holding the option key while emptying the trash should override this lock.

- It could be that a part of the path we have contains folders that have the HFS+ attribute "hidden" set. Under UNIX systems (like OS X) files or directories that start with a period (like .Trash/ or ~/.signature) are hidden so we don't see them in OS X (unless we change the Finder's default behaviour with a hack like Tinkertool or we use the terminal's ls -a command). OS 9 doesn't care about these periods and shows these files, but it DOES care about the HFS+ attribute "hidden". If a folder in the path has this attribute set we will not be able to see it in the OS 9 Finder and therefore we won't be able to double-click its icon and "see" further down the path. The solution is to use another hack (FileBuddy for example) while in OS 9 to change the "hidden" attribute to off. Once this is done we will be able to see the folder in the OS 9 Finder. From there on everything should work like I described above.

Hope that helps.
( Last edited by Simon; Jan 6, 2003 at 06:36 AM. )
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 01:21 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,