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 with 755 permissions.
def handle_uploaded_file(upfile, cTimeStamp):
target_dir = "path_to_my_working_dir/tmp_files/%s" % (cTimeStamp)
os.makedirs(target_dir, mode=0777)
chmod 0777is wrong and insecure and you should revert to sane permissions immediately, or in the worst case reinstall your system if you cannot be sure that users who should not be able to overwrite system files haven't abused the security hole you created. - tripleee