gpt4 book ai didi

permissions - 如何解决 TAR : CANNOT MKDIR PERMISSION DENIED

转载 作者:行者123 更新时间:2023-12-04 23:44:59 39 4
gpt4 key购买 nike

文件权限
我有一个文件 data.tgz我想解压缩。

-rw-r--r-- 1 username group 20342951248 mai 18 11:50 data.tgz



目录权限
文件所在的目录

drwxrwxr-x 3 username group 4096 juin 1 17:16 directory/



解压
当我尝试使用以下命令解压缩文件时:
tar - xzf data.tgz 
我收到以下错误:
tar: data : CANNOT MKDIR PERMISSION DENIED
tar: data/a-m-00004.nt.gz : open impossible: No such file or directory
当我使用 tar -xzvf data.tgz我收到以下错误

错误
tar: data : mkdir impossible: Permission non accordée
tar: data/a-m-00013.nt.gz : open impossible: Aucun fichier ou dossier de ce type
data/a-m-00012.nt.gz
tar: data : mkdir impossible: Permission non accordée
tar: data/a-m-00012.nt.gz : open impossible: Aucun fichier ou dossier de ce type
data/a-m-00015.nt.gz
tar: data : mkdir impossible: Permission non accordée
tar: data/a-m-00015.nt.gz : open impossible: Aucun fichier ou dossier de ce type
data/a-m-00014.nt.gz
tar: data : mkdir impossible: Permission non accordée
tar: data/a-m-00014.nt.gz : open impossible: Aucun fichier ou dossier de ce type
data/a-m-00017.nt.gz
tar: data : mkdir impossible: Permission non accordée
tar: data/a-m-00017.nt.gz : open impossible: Aucun fichier ou dossier de ce type
data/a-m-00016.nt.gz
tar: data : mkdir impossible: Permission non accordée
tar: data/a-m-00016.nt.gz : open impossible: Aucun fichier ou dossier de ce type
data/a-m-00019.nt.gz

谷歌翻译
tar: data: mkdir impossible not granted Permissions
    tar: data / am-00013.nt.gz: Can not open: No such file or folder of this type
    data / a-m-00012.nt.gz
    tar: data: mkdir impossible not granted Permissions
    tar: data / am-00012.nt.gz: Can not open: No such file or folder of this type
    data / a-m-00015.nt.gz
    tar: data: mkdir impossible not granted Permissions
    tar: data / am-00015.nt.gz: Can not open: No such file or folder of this type
    data / a-m-00014.nt.gz
    tar: data: mkdir impossible not granted Permissions
    tar: data / am-00014.nt.gz: Can not open: No such file or folder of this type
    data / a-m-00017.nt.gz
    tar: data: mkdir impossible not granted Permissions
    tar: data / am-00017.nt.gz: Can not open: No such file or folder of this type
    data / a-m-00016.nt.gz
    tar: data: mkdir impossible not granted Permissions
    tar: data / am-00016.nt.gz: Can not open: No such file or folder of this type
    data / a-m-00019.nt.gz

最佳答案

您正试图在您没有写入权限的路径中解压缩。尝试运行此命令以在用户的​​主目录中提取:tar -xzf data.tgz /home/yourusername
或者尝试使用 sudo 即 sudo tar -xzf data.tgz

关于permissions - 如何解决 TAR : CANNOT MKDIR PERMISSION DENIED,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30577369/

39 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com