Permissions 如何解决TAR:不能拒绝MKDIR权限 文件权限

Permissions 如何解决TAR:不能拒绝MKDIR权限 文件权限,permissions,tar,mkdir,Permissions,Tar,Mkdir,我有一个要解压缩的文件data.tgz -rw-r--r--1用户名组20342951248 mai 18 11:50data.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 imp

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

-rw-r--r--1用户名组20342951248 mai 18 11:50data.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-xzf data.tgz/home/yourusername


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

如果在命令中添加-verbose标志和-perserve permissions标志,会发生什么情况
tar-xzfvp data.tgz
我可以不将其用作根目录吗?我不知道是的,以root身份尝试..tar-xzvf data.tgz/home/haniGOTC==>什么都没有在屏幕上产生任何结果你在运行什么操作系统?你会做sudo吗?不,实际上我不会。因为我在服务器上运行,并且使用Linux kubuntu。我没有提到,但该文件位于远程服务器上。您是否尝试过将该文件从服务器下载到您的计算机上?你有这样做的资格证书吗?如果是,请运行
sftpuser@host:/path/to/data.tgz~/some/local/directory
scpuser@host:/path/to/data.tgz~/some/local/directory
,然后导航到该目录并尝试提取。您还可以尝试删除连字符。我听说GNU在tar可选参数方面有一些有趣的行为。主目录外部的大多数路径需要根权限才能创建文件夹,这可能就是您遇到的问题
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