如何解决TAR:不能拒绝MKDIR许可

时间:2015-06-01 15:28:09

标签: permissions tar mkdir

文件权限

我有一个文件data.tgz我要解压缩。

  

-rw-r - r-- 1 用户名 群组 20342951248 mai 18 11:50 data.tgz

目录权限

文件所在的目录

  

drwxrwxr-x 3用户名组4096 juin 1 17:16目录/

解压缩

当我尝试使用以下命令解压缩文件时:

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

Google翻译

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

1 个答案:

答案 0 :(得分:7)

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

或尝试使用sudo即sudo tar -xzf data.tgz