title: Permission problems when creating a dir with os.makedirs in Python
body: <p>I'm simply trying to handle an uploaded file and write it in a working dir which name is the system timestamp. The problem is that I want to create that directory with full permission (<strong>777</strong>) but I can't! Using the following piece of code the created directory with <strong>755</strong> permissions.</p>
  <pre><code>def handle_uploaded_file(upfile, cTimeStamp):
      target_dir = &quot;path_to_my_working_dir/tmp_files/%s&quot; % (cTimeStamp)
      os.makedirs(target_dir, mode=0777)
  </code></pre>