我尝试使用
创建文件path = 'temp.txt'
# cerca la posizione nel file di tutti i <img
with open(path, "w", encoding='utf-8') as tmp:
tmp.write(sp)
tmp.close()
文件具有以下权限:
-rwxrwxrwx 1 www-data www-data 647943 Jun 20 13:52 temp.txt
但是我仍然得到
PermissionError: [Errno 13] Permission denied: 'temp.txt'
我该如何解决?我尝试使用chmod授予文件和文件夹的777和775权限,但没有任何改变