Permission problems when creating a dir with os.makedirs (python)
<p><br />
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 (777) but I CAN'T! Using the following piece of code the created directory has 755 permissions.</p>

<pre><code>def handle_uploaded_file(upfile, cTimeStamp):
    target_dir = "path_to_my_working_dir/tmp_files/%s" % (cTimeStamp)
    os.makedirs(target_dir, mode=0777)
</code></pre>

<p>Anybody can help me? Many thanks.</p>
