【问题标题】:Unable to extract tar file - tar: extract not authorized无法提取 tar 文件 - tar:未授权提取
【发布时间】:2014-06-23 08:58:16
【问题描述】:

我正在使用 Solaris 10 机器。因为我无法解压缩我的文件。日志如下。任何人请建议可能是什么问题?我可以创建 tar 文件但无法解压缩。 :(

bash-3.2# ls -lrth ConfigCheck-120614-KL.out*
-rw-r--r-- 1 root root 144K Jun 12 17:15 ConfigCheck-120614-KL.out
-rwxrwxrwx 1 root root 146K Jun 16 16:49 ConfigCheck-120614-KL.out.tar
bash-3.2# tar xvf ConfigCheck-120614-KL.out.tar 
tar: extract not authorized
bash-3.2# tar tvf ConfigCheck-120614-KL.out.tar
-rw-r--r-- 0/0 147377 Jun 12 17:15 2014 ConfigCheck-120614-KL.out

【问题讨论】:

  • 只有在文件已经存在的情况下才会出现该错误(例如,您不是 root,因此您无法覆盖现有文件)?
  • 我以 root 身份登录,即使文件不存在于同一目录中,也会发生此问题。供您参考,请查找日志。 bash-3.2# ls -lrth total 8461 drwxr-xr-x 3 root root 14 Jun 23 13:37 SDP5_3271_10_23 -rwxr-xr-x 1 sdpuser 员工 4.1M Jun 23 14:18 1_19089CXP102081_4Ux3271-rw-r8. -- 1 root root 4.1M Jun 23 14:27 SDP5_3271_10_23.tar bash-3.2# pwd /opt/temp/sdp bash-3.2# who am i root pts/2 Jun 23 11:31 (150.236.11.66) bash-3.2 # tar xvf 1_19089CXP102081_4Ux3271_10_23_EP08.tar tar: 解压未授权的bash-3.2#
  • 看来您可能需要安装 gnu tar。

标签: unix solaris tar solaris-10


【解决方案1】:

如果您以 uid 0 运行但没有在 RBAC 配置中设置 Media Restore profile,则 Solaris 11 tar 将失败并显示该错误消息。

除非您尝试从备份中恢复,否则您通常应该以普通用户而不是 root 用户身份解压缩文件,以避免意外覆盖关键系统文件。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-09-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-03
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多