-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Podman 权限问题 #30
Comments
你在什么宿主机上运行的?什么操作系统、docker哪个版本、cpu指令集(amd64或arm)? |
感觉像是用的podman?podman需要加上--privileged或者--device /dev/net/tun,而且初始化的时候不能运行mknod: /dev/net/tun,因为--privileged权限下或者映射状态下tun是已存在的 |
如果是 podman 的话试试这个解决方案? |
mknod: /dev/net/tun: Operation not permitted |
在添加--privileged状态下, 报错变成了mknod: /dev/net/tun: File exists |
我还是倾向于找到相应需要的cap,应该可以用strace找到,我明天研究一下。你可以先试试把 NET_RAW 加上。 |
如果实在找不到我就 merge 你的 PR |
containers/common#1240 (comment) 应该还需要 MKNOD |
这个之前试过了,仍然提示权限不足 |
我做了以下的实验: cap_drop:
- ALL
cap_add:
# defualt cap of podman
- CHOWN
- DAC_OVERRIDE
- FOWNER
- FSETID
- KILL
- NET_BIND_SERVICE
- SETFCAP
- SETGID
- SETPCAP
- SETUID
- SYS_CHROOT
# docker have these cap as default additonally
- MKNOD
# - NET_RAW
- AUDIT_WRITE
# additional required cap for warp
- NET_ADMIN 是可以跑通的。 总结一下就是 podman 比 Docker 默认少了三个 CAP 其中 cap_add:
# Docker already have it, these are for podman users
- MKNOD
- AUDIT_WRITE
# additional required cap for warp, both for podman and docker
- NET_ADMIN @bamboox @tony-sung 请你们在 docker-compose.yml 中加入 |
你是不是使用的rootful运行的container?我是用rootless仍然提示not permitted |
啥意思,你的 docker/podman 守护进程是以 rootless mode 运行的? |
是的, 一般podman用户都是冲着rootless入的坑 |
@tony-sung 我已经合并了你的 PR,等 Action 构建完之后应该就可以用了。我之后会写一个关于 Podman 的 guidence,但是要等一个星期左右,我现在在赶一个论文的投稿 DDL。 |
好的, 感谢, 我刚刚试了一下
|
sudo: unable to send audit message: Operation not permitted
sudo: unable to send audit message: Operation not permitted
mknod: /dev/net/tun: Operation not permitted
sudo: unable to send audit message: Operation not permitted
sudo: unable to send audit message: Operation not permitted
mknod: /dev/net/tun: Operation not permitted
The text was updated successfully, but these errors were encountered: