首页 > 解决方案 > SELinux dpkg postinst 脚本权限被拒绝

问题描述

selinux 安装在 debian 9 (stretch) 上

当我尝试使用 dpkg(或 apt)安装某些东西(尝试使用不同的软件包)时,它会失败并显示以下错误消息:

dpkg (subprocess): unable to execute installed post-installation script (/var/lib/dpkg/info/cmatrix.postinst): Permission denied
dpkg: error processing package cmatrix (--configure):
 subprocess installed post-installation script returned error exit status 2

我是root,即使在许可模式下也会出现问题(禁用selinux时它可以工作)

dpkg 具有标签“dpkg_exec_t”。postinst 文件的权限如下:

-rwxr-xr-x. 1 root root unconfined_u:object_r:dpkg_var_lib_t:s0 192 May  4 16:51 /var/lib/dpkg/info/cmatrix.postinst

我可以直接从终端运行脚本,没有错误。

我试图安装 selinux 的 sid 版本,但那里也发生了错误。

安装的策略是默认策略。

标签: debianselinuxdpkgdebian-stretch

解决方案


推荐阅读