This is a question from a newbie trying to learn UNIX commands. I was trying to test the rmdir command by removing a test directory located in my Downloads directory. I have read and write rights on Downloads. I issued rmdir -p /Users/myself/Downloads/testand got rmdir: /Users/myself/Downloads: Permission denied, but the test directory was deleted. So why do I have this message? Should I care?I'm using OSX Lion 10.7.3.
OSX : rmdir permission denied but directory removed
command line;permissions;osx;directory;rm
From man rmdir:   -p, --parents          remove DIRECTORY and its ancestors; e.g., `rmdir -p a/b/c' is similar to `rmdir a/b/c a/b a'So your rmdir call tries to delete test (succeeds), then tries to delete the parent directory Documents (or rather Downloads) and fails... I think.  I'd rather have expected some directory not empty error, because why shouldn't you have the permissions to delete this folder?