【发布时间】:2018-06-06 07:29:50
【问题描述】:
我想提取文件夹中的所有 tar.gz,但我得到 [Errno 13] 权限被拒绝。我经历过与该问题相关的不同帖子,但没有任何帮助。即使在 tar.gz 中提取特定成员也会产生相同的错误。有人可以帮忙解决什么问题吗?
I want to create a script for unzip (.tar.gz) file via (Python)
Python: Extracting specific files with pattern from tar.gz without extracting the complete file
Overwrite existing read-only files when using Python's tarfile
tar = tarfile.open(fname, "r:gz")
tar.extractall()
tar.close()
【问题讨论】:
-
显然您没有创建新文件的权限。你的目录权限是什么?
-
我对我的 Mac 上的目录具有读写权限
标签: python-2.7