title: mkdir -p fails when directory exists
body: <p>On one of our remote systems <code>mkdir -p $directory</code> fails when the directory exists. which means it shows </p>
  
  <blockquote>
    <p>mkdir: cannot create directory '$directory' : file exists</p>
  </blockquote>
  
  <p>This is really puzzling, as I believed the contract of <code>-p</code> was that is always succeed when the directory already exists. And it works on the other systems I tried.</p>
  
  <p>there is a user <code>test</code> on all of these systems, and <code>directory=/home/test/tmp</code>.</p>