Description
Issue Description
I have a server with several quadlets in /etc/containers/systemd/<uid>/, some at the root, but most of them grouped in subdirectories.
Today I found out (in a very bad way) that if all the quadlets are in subdirectories of <uid>, then the enabled quadlets are started by ALL users. It's as if they were in /etc/containers/systemd/users/.
I found out that the enabled quadlets in /etc/containers/systemd/<uid> are being started for ALL users, as if they were in /etc/containers/systemd/users. I suspect this may be caused by the fact that <uid> is a symlink to a read-only directory in /opt.
This is happening with podman 5.5.0, running in a custom bootc distro based on fedora-bootc:42.
Steps to reproduce the issue
$ ls /etc/containers/systemd/users/ -l
lrwxrwxrwx. 1 root root 24 May 31 21:58 1000 -> /opt/somedir
Describe the results you received
The quadlets are started by ALL users. There are conflicts on network ports, and the whole server became unusable.
Describe the results you expected
The quadlets should be started only by the user with that UID.
podman info output
host:
arch: amd64
buildahVersion: 1.40.0
cgroupControllers:
- cpu
- memory
- pids
cgroupManager: systemd
cgroupVersion: v2
conmon:
package: conmon-2.1.13-1.fc42.x86_64
path: /usr/bin/conmon
version: 'conmon version 2.1.13, commit: '
cpuUtilization:
idlePercent: 49.19
systemPercent: 8.65
userPercent: 42.16
cpus: 2
databaseBackend: sqlite
distribution:
distribution: fedora
version: "42"
eventLogger: journald
freeLocks: 2039
hostname: hz01.silkmicro.com
idMappings:
gidmap:
- container_id: 0
host_id: 1001
size: 1
- container_id: 1
host_id: 589824
size: 65536
uidmap:
- container_id: 0
host_id: 1001
size: 1
- container_id: 1
host_id: 589824
size: 65536
kernel: 6.14.8-300.fc42.x86_64
linkmode: dynamic
logDriver: journald
memFree: 2541277184
memTotal: 3994800128
networkBackend: netavark
networkBackendInfo:
backend: netavark
dns:
package: aardvark-dns-1.15.0-1.fc42.x86_64
path: /usr/libexec/podman/aardvark-dns
version: aardvark-dns 1.15.0
package: netavark-1.15.1-1.fc42.x86_64
path: /usr/libexec/podman/netavark
version: netavark 1.15.1
ociRuntime:
name: crun
package: crun-1.21-1.fc42.x86_64
path: /usr/bin/crun
version: |-
crun version 1.21
commit: 10269840aa07fb7e6b7e1acff6198692d8ff5c88
rundir: /run/user/1001/crun
spec: 1.0.0
+SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +LIBKRUN +WASM:wasmedge +YAJL
os: linux
pasta:
executable: /usr/bin/pasta
package: passt-0^20250512.g8ec1341-1.fc42.x86_64
version: ""
remoteSocket:
exists: true
path: /run/user/1001/podman/podman.sock
rootlessNetworkCmd: pasta
security:
apparmorEnabled: false
capabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
rootless: true
seccompEnabled: true
seccompProfilePath: /usr/share/containers/seccomp.json
selinuxEnabled: true
serviceIsRemote: false
slirp4netns:
executable: ""
package: ""
version: ""
swapFree: 0
swapTotal: 0
uptime: 2h 21m 44.00s (Approximately 0.08 days)
variant: ""
plugins:
authorization: null
log:
- k8s-file
- none
- passthrough
- journald
network:
- bridge
- macvlan
- ipvlan
volume:
- local
registries:
search:
- registry.fedoraproject.org
- registry.access.redhat.com
- docker.io
store:
configFile: /var/home/weaver/.config/containers/storage.conf
containerStore:
number: 1
paused: 0
running: 1
stopped: 0
graphDriverName: overlay
graphOptions: {}
graphRoot: /var/home/weaver/.local/share/containers/storage
graphRootAllocated: 39255314432
graphRootUsed: 16783691776
graphStatus:
Backing Filesystem: xfs
Native Overlay Diff: "true"
Supports d_type: "true"
Supports shifting: "false"
Supports volatile: "true"
Using metacopy: "false"
imageCopyTmpDir: /var/tmp
imageStore:
number: 8
runRoot: /run/user/1001/containers
transientStore: false
volumePath: /var/home/weaver/.local/share/containers/storage/volumes
version:
APIVersion: 5.5.0
BuildOrigin: Fedora Project
Built: 1747180800
BuiltTime: Wed May 14 00:00:00 2025
GitCommit: 0dbcb51477ee7ab8d3b47d30facf71fc38bb0c98
GoVersion: go1.24.3
Os: linux
OsArch: linux/amd64
Version: 5.5.0
Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
Yes
Additional environment details
Custom bootc distro based on fedora-bootc:42