-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
unexpected permission change of /run/user/$UID #4846
Comments
@giuseppe PTAL. I want to say this is the userns code adding +x to allow the other users mapped into the user namespace to access container files, but I'm not sure what specifically it would need to access in the container tmpdir. Can you provide more details on the KDE errors as well? I don't know why adding execute permissions for group+all on that directory would cause KDE to not work. |
yes correct. The userns code changes the directory permissions so that an user != your UID can access the storage and the tmpdir. |
This is a parts of the syslog:
This is all I could find to narrow the problem, sorry. |
So it explicitly required 0700. Interesting. I don't really know what we can do about this aside from moving our temporary files dir out of |
Can we create a subdir |
Without execute on the top-level |
If the container process is walking the path it would but if this is volume mounted into the container then it does not. At least that is what I understand. @giuseppe would know for sure. |
it looks like changing the permissions for the rundir and the tmpdir is not needed anymore. I've tested it both with runc and crun. I've opened a PR here: #4859 |
do not change the permissions mask for the rundir and the tmpdir when running a container with a user namespace and the current user is mapped inside the user namespace. The change was introduced with 849548f, that dropped the intermediate mount namespace in favor of allowing root into the user namespace to access these directories. Closes: containers#4846 Signed-off-by: Giuseppe Scrivano <[email protected]>
I'm having the same issue as described above. I ran my stat -c "%a %n" /run/user/$UID
700 /run/user/1001 And after the stat -c "%a %n" /run/user/$UID
711 /run/user/1001 After that some of my applications e.g. the Dolphin browser don't work anymore saying Output of Version: 2.1.1
API Version: 2.0.0
Go Version: go1.14.9
Built: Wed Sep 30 21:31:11 2020
OS/Arch: linux/amd64 Output of
I use Fedora 32 and I also tried |
podman needs to make the directory accessible otherwise the user in a user namespace cannot access it (--userns=keep-id). |
/kind bug
Description
Running a container with a modified uidmap (eg. --userns=keep-id) leads to an unexpected permission change of /run/user/$UID (from (7)700 to (7)711). Which in turn leads to a malfunction of the KDE plasma desktop i'm using.
Steps to reproduce the issue:
stat -c "%a %n" /run/user/$UID
podman run --rm -it --userns=keep-id docker.io/archlinux/base
stat -c "%a %n" /run/user/$UID
Describe the results you received:
Opening the file dialog of a KDE app like kate leads to an error message: "can not create socket..."
Additional information you deem important (e.g. issue happens only occasionally):
After manually fixing the permission back to 7700, the KDE apps are working.
The permission is also changed when using --uidmap.
Output of
podman version
:Version: 1.7.0
RemoteAPI Version: 1
Go Version: go1.13.5
Git Commit: b7ce115-dirty
Built: Sat Jan 11 13:49:39 2020
OS/Arch: linux/amd64
(same before podman update from 1.6.1 to 1.7.0)
Output of
podman info --debug
:debug:
compiler: gc
git commit: b7ce115-dirty
go version: go1.13.5
podman version: 1.7.0
host:
BuildahVersion: 1.12.0
CgroupVersion: v1
Conmon:
package: Unknown
path: /usr/bin/conmon
version: 'conmon version 2.0.3, commit: eb5fa88c26fde5ce1e3f8a1d2a8a9498b2d7dbe6'
Distribution:
distribution: arch
version: unknown
IDMappings:
gidmap:
host_id: 1000
size: 1
host_id: 1000000
size: 65536
uidmap:
host_id: 1000
size: 1
host_id: 1000000
size: 65536
MemFree: 6480297984
MemTotal: 16747290624
OCIRuntime:
name: runc
package: Unknown
path: /usr/bin/runc
version: |-
runc version 1.0.0-rc9
commit: d736ef14f0288d6993a1845745d6756cfc9ddd5a
spec: 1.0.1-dev
SwapFree: 39280701440
SwapTotal: 39280701440
arch: amd64
cpus: 8
eventlogger: file
hostname: dev1
kernel: 5.4.10-1-ck
os: linux
rootless: true
slirp4netns:
Executable: /bin/slirp4netns
Package: Unknown
Version: |-
slirp4netns version 0.4.2
commit: 69153b0d1cb82216d6782179ff7c3c5e91c731a1
uptime: 3h 57m 2.76s (Approximately 0.12 days)
registries:
localhost:
Blocked: false
Insecure: true
Location: localhost
MirrorByDigestOnly: false
Mirrors: []
Prefix: localhost
search:
store:
ConfigFile: /home/developer/.config/containers/storage.conf
ContainerStore:
number: 1
GraphDriverName: overlay
GraphOptions:
overlay.mount_program:
Executable: /bin/fuse-overlayfs
Package: Unknown
Version: |-
fusermount3 version: 3.9.0
fuse-overlayfs: version 0.7.2
FUSE library version 3.9.0
using FUSE kernel interface version 7.31
GraphRoot: /home/developer/.local/share/containers/storage
GraphStatus:
Backing Filesystem: btrfs
Native Overlay Diff: "false"
Supports d_type: "true"
Using metacopy: "false"
ImageStore:
number: 1
RunRoot: /run/user/1000/containers
VolumePath: /home/developer/.local/share/containers/storage/volumes
Additional environment details (AWS, VirtualBox, physical, etc.):
I'm using an up-to-date arch linux, last system upgrade today. This is happening on a second machine (also arch linux) too.
I tried a
podman system reset
but no change.The text was updated successfully, but these errors were encountered: