Take the 2-minute tour ×

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 serverfault.com 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

1 Answer 1

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


