Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I ran the following command in the terminal of a Mac Pro running Mac OSX 10.6.8.

rm -rd /Users/Shared/SomeFolder

This command resulted in

rm: /Users/Shared/SomeFolder: Permission denied

Without changing anything, I immediately ran that command again, and it worked. What caused this to happen?

share|improve this question

migrated from Jan 6 '12 at 18:27

This question came from our site for system and network administrators.

Without more info, it's almost impossible to guess. The only thing that immediately comes to mind is that some process was accessing the folder or its contents, but terminated or released its lock between the two attempts. But I couldn't swear to it. Any log messages available? – Jason Lewis Jan 6 '12 at 17:34

It's possible there was a write-lock on that folder when you attempted the first rm. An application or process could have been indexing or accessing the folder. Things like Mozy Backup or the Spotlight Search run in the background and access most all files on a file system.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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