Podman

podman fail to run container with volume setting

From podman logs <container> command, get following error message:

chown: changing ownership of ‘XXX‘: Permission denied

Here’s there solutions:

  1. add “–privileged=true” options when use podman run
  2. disable selinux
  3. add rule to selinux, run command :chcon -Rt svirt_sandbox_file <mount dir>

于是,解决方法有这么三个:

  • 在podman run中加入 –privileged=true  给容器加上特定权限
  • 关闭selinux
  • 在selinux添加规则,修改挂载目录, 命令如下chcon -Rt svirt_sandbox_file

Leave a Reply

Your email address will not be published. Required fields are marked *