-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Unable to expose rclone mount to host when using rootless #10207
Comments
If there is such a restriction, I suspect it's at the kernel level, so unfortunately Podman itself won't be able to do much about it. |
|
We should add a check to throw an error when the user tries them, then - having a mount that just doesn't exist because options are unsupported is very confusing. |
It doesn't hurt asking: is there a workaround? |
they are still accessible from the
if you go into the Unfortunately this cannot propagate mounts to the host, you need to run as root for that. |
Correct the problem here is the executor or Podman has to have control of the mount namespace. When a rootless user runs podman it mounts within the usernamespace/mount namespace, But when you exit the namespaces, you loose the view. If you use podman unshare, you should then see the propagated namespace. But the hosts mount namespace will never see it. When running as root, we don't automatically create a userns/mountns since we have SYS_ADMIN privs and are allowed to modify the host mount namespace. |
--cap-add SYS_ADMIN wouldn't solve the "issue"? |
No, when you are rootless, you don't have access to REAL SYS_ADMIN. when you specify --cap-add SYS_ADMIN, you are just running a container with Namespaced CAP_SYSADMIN, which gives you this for the User Namespace you are running in, not the hosts user namespace. |
Remember rootless environments do not provide a way to break out and control the host. The same rules about what a user is allowed to do on a host are preserved. |
Got it! Thank you all! |
Another question regarding this: would it be possible to share that mount with other containers in rootless mode? |
yes, from the |
Would this be possible to expose the mount to other containers in rootless? |
/kind bug
Description
Can't mount/expose mount when using rootless. Also, can't access the port.
Steps to reproduce the issue:
podman pull rclone/rclone:latest
mkdir -p ~/data/mount
Describe the results you received:
The rclone command seems to be working, but the mount isn't exposed to the host, apparently.
2021/05/04 14:02:10 NOTICE: Serving remote control on http://localhost:5590/
If you ls ~/data/mount, it'll be empty.
However, it works if you run the podman command with sudo.
Describe the results you expected:
Show the mount in ~/data/mount.
Additional information you deem important (e.g. issue happens only occasionally):
It works if you run the podman command with sudo.
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)
No
The text was updated successfully, but these errors were encountered: