use chmod -R 777 to ota_result file path
This commit is contained in:
parent
a0bf5a6f1c
commit
012df34124
|
@ -2674,13 +2674,14 @@ def main(options, rootdir="/"):
|
|||
config_to_result.set("OTA","upgrade","1")
|
||||
if not os.path.exists(OTA_RESULT_FILE_PATH):
|
||||
os.makedirs(OTA_RESULT_FILE_PATH)
|
||||
os.chmod(OTA_RESULT_FILE_PATH,stat.S_IRUSR|stat.S_IWUSR|stat.S_IWGRP|stat.S_IRGRP|stat.S_IWOTH|stat.S_IROTH)
|
||||
# os.chmod(OTA_RESULT_FILE_PATH,stat.S_IRUSR|stat.S_IWUSR|stat.S_IWGRP|stat.S_IRGRP|stat.S_IWOTH|stat.S_IROTH)
|
||||
if not os.path.exists(OTA_RESULT_FILE):
|
||||
f = open(OTA_RESULT_FILE,'w')
|
||||
f.close()
|
||||
with open(OTA_RESULT_FILE,"w+") as f:
|
||||
config_to_result.write(f)
|
||||
os.chmod(OTA_RESULT_FILE,stat.S_IRUSR|stat.S_IWUSR|stat.S_IWGRP|stat.S_IRGRP|stat.S_IWOTH|stat.S_IROTH)
|
||||
subprocess.Popen("chmod -R 777 %s"%(OTA_RESULT_FILE_PATH),shell=True)
|
||||
# os.chmod(OTA_RESULT_FILE,stat.S_IRUSR|stat.S_IWUSR|stat.S_IWGRP|stat.S_IRGRP|stat.S_IWOTH|stat.S_IROTH)
|
||||
# os.chmod(OTA_RESULT_FILE,stat.S_IRWXU|stat.S_IRWXG|stat.S_IRWXO)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue