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:
- add “–privileged=true” options when use podman run
- disable selinux
- add rule to selinux, run command :chcon -Rt svirt_sandbox_file <mount dir>
于是,解决方法有这么三个:
- 在podman run中加入 –privileged=true 给容器加上特定权限
- 关闭selinux
- 在selinux添加规则,修改挂载目录, 命令如下chcon -Rt svirt_sandbox_file