@collinfunk
hmm but how do you tell apart:
1. mkdir -p a/b tries to create a, fails from EACCESS
2. someone else creates a
3. mkdir checks if a exists, it does, so it goes on to create a/b
from
1. someone else creates a
2. mkdir tries to create a, fails from EEXISTS
3. mkdir goes on to create a/b
?
Oh, there's supposed to be a chmod, which would have to be tried (and potentially fail) after discovering the directory exists, not before...