-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Description
Issue Description
Hi there,
I am trying to set up my containers as Quadlets/systemd services. Many of them running rootless and with group permissions.
I am using Fedora 43 Server Edition, with podman 5.7.1
The commands work fine with proton run as in
podman run --userns=keep-id --group-add keep-groups ubi8 id
And I can confirm the ids.
uid=1001(rootless_usr) gid=1002(rootless_usr) groups=1002(rootless_usr),1001(dir)
uid=1001(rootless_usr) gid=1002(rootless_usr) groups=1002(rootless_usr),65534(nobody)
The same does not work as Quadlet for rootless users. But it does work for root user.
#ubi8.container
[Container]
Exec=id
Image=ubi8
#PodmanArgs=--group-add keep-groups
GroupAdd=keep-groups
UserNS=keep-idSteps to reproduce the issue
Steps to reproduce the issue
as a rootless user:
- on terminal enter
id> uid=1001 gid=1002 groups=1002,1001 podman run --userns=keep-id --group-add keep-groups ubi8 id> uid=1001 gid=1002 groups=1002,65534(nobody)- Add the
ubi8.containerdescribed above to ~/.config/containers/systemd/ - systemctl --user daemon-reload
- systemctl --user start ubi8
- systemctl --user status ubi8 >
Jan 07 17:48:12 fedora_server systemd-ubi8[110952]: uid=1001(rootless_usr) gid=1002(rootless_usr) groups=1002(rootless_usr)
*nobody is missing
as root user
- on terminal enter
id> uid=1000 gid=1000 groups=1000,1001 podman run --userns=keep-id --group-add keep-groups ubi8 id> uid=1000 gid=1000 groups=1000,65534(nobody)- Add the
ubi8.containerdescribed above to ~/.config/containers/systemd/ - systemctl --user daemon-reload
- systemctl --user start ubi8
- systemctl --user status ubi8 >
Jan 07 17:44:11 fedora_server systemd-ubi8[110781]: uid=1000(root) gid=1000(root) groups=1000(root),65534(no
Describe the results you received
Group 1001 has access to the files I need. Their permission appears as 65534(nobody) inside the container, and I can access them just fine rootless with:
podman run --userns=keep-id --group-add keep-groups -v /mnt/dir:/dir:ro ubi8 ls -lah /dir
but I cannot access them with:
# ubi8.container
[Container]
Exec=ls -lah /dir
Image=ubi8
PodmanArgs=--group-add keep-groups
UserNS=keep-id
Volume=/mnt/dir:/dir:roDescribe the results you expected
I expected the Quadlet to behave similar to the podman run command when used rootless. And similar to the root Quadlet.
podman info output
host:
arch: amd64
buildahVersion: 1.42.2
cgroupControllers:
- cpu
- memory
- pids
cgroupManager: systemd
cgroupVersion: v2
conmon:
package: conmon-2.1.13-2.fc43.x86_64
path: /usr/bin/conmon
version: 'conmon version 2.1.13, commit: '
cpuUtilization:
idlePercent: 99.74
systemPercent: 0.16
userPercent: 0.1
cpus: 4
databaseBackend: sqlite
distribution:
distribution: fedora
variant: server
version: "43"
emulatedArchitectures:
- linux/arm
- linux/arm64
- linux/arm64be
eventLogger: journald
freeLocks: 2009
hostname: fedora_server
idMappings:
gidmap:
- container_id: 0
host_id: 1002
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.17.12-300.fc43.x86_64
linkmode: dynamic
logDriver: journald
memFree: 406761472
memTotal: 8083623936
networkBackend: netavark
networkBackendInfo:
backend: netavark
dns:
package: aardvark-dns-1.17.0-1.fc43.x86_64
path: /usr/libexec/podman/aardvark-dns
version: aardvark-dns 1.17.0
package: netavark-1.17.1-1.fc43.x86_64
path: /usr/libexec/podman/netavark
version: netavark 1.17.1
ociRuntime:
name: crun
package: crun-1.25.1-1.fc43.x86_64
path: /usr/bin/crun
version: |-
crun version 1.25.1
commit: 156ae065d4a322d149c7307034f98d9637aa92a2
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^20251215.gb40f5cd-1.fc43.x86_64
version: |
pasta 0^20251215.gb40f5cd-1.fc43.x86_64
Copyright Red Hat
GNU General Public License, version 2 or later
<https://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
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: /usr/bin/slirp4netns
package: slirp4netns-1.3.1-3.fc43.x86_64
version: |-
slirp4netns version 1.3.1
commit: e5e368c4f5db6ae75c2fce786e31eef9da6bf236
libslirp: 4.9.1
SLIRP_CONFIG_VERSION_MAX: 6
libseccomp: 2.6.0
swapFree: 8083345408
swapTotal: 8083468288
uptime: 142h 43m 58.00s (Approximately 5.92 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: /home/rootless_usr/.config/containers/storage.conf
containerStore:
number: 39
paused: 0
running: 0
stopped: 39
graphDriverName: overlay
graphOptions: {}
graphRoot: /home/rootless_usr/.local/share/containers/storage
graphRootAllocated: 16039018496
graphRootUsed: 8387969024
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: 2
runRoot: /run/user/1001/containers
transientStore: false
volumePath: /home/rootless_usr/.local/share/containers/storage/volumes
version:
APIVersion: 5.7.1
BuildOrigin: Fedora Project
Built: 1765324800
BuiltTime: Tue Dec 9 17:00:00 2025
GitCommit: f845d14e941889ba4c071f35233d09b29d363c75
GoVersion: go1.25.4 X:nodwarf5
Os: linux
OsArch: linux/amd64
Version: 5.7.1Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
Yes
Additional environment details
Fedora Linux 43 (Server Edition)
Additional information
I also tried adding to the file ubi8.container
PodmanArgs=--group-add keep-groups
and
Annotation=run.oci.keep_original_groups=1
Instead of GroupAdd. Without success.