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:
- 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.
- 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).
- 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.