What to do when OS X asks for a username and password (authentication) when deleting files

A client recently presented with an oddity: Every time he tried to delete a file from his Desktop directory, the OS queried for authentication. He stated that the problem began immediately after he upgraded to OS X 10.7, and that it only affected his Desktop folder.

This case, in retrospect, serves as a reminder of three things:

  1. Never take the client’s word that they have tested the situation to your satisfaction. In this instance, I asked if it was just the Desktop, and the client said yes. Turns out it affected all source directories.
  2. Never succumb to age-old temptation to conflate “last action taken” with “source of current problem”. I spent a while down the rabbit hole of errors in the Lion installer (and to be fair, that may have been it, but it unnecessarily restricted my search criteria).
  3. Occam’s Razor: Always check both ends of a transaction before running off looking for more complicated solutions.

I looked for known Lion installer problems. Nothing. I briefly suspected the all deny delete ACL on ~/Desktop, until I remembered that this was normal for Lion. I ran a permissions repair, thinking that perhaps some odd inheritance was going on. This was actually good, as it fixed a metric ton of other, unrelated problems, but was otherwise unhelpful. I looked into the console for indications of trouble, found an out-of-place entry for something called Safe Connect, and spent a while running that down. No dice.

The problem here is that I kept looking for problems with the source directory: ~/Desktop. I eventually broadened my search criteria a bit and found this post, which nailed the problem squarely. The problem was that ownership of the target directory — ~/.Trash — had been changed to root. Had I checked the two ends of the delete transaction to start with, I could’ve saved myself a whole lot of trouble and my client a lot of time.

I still have no idea what actually caused the problem. It’s not unreasonable to suspect the Lion installer. But the source of the problem is less important than finding a solution for it.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s