Foxbox uses the systemd directory structure for managing cgroups (namely /sys/fs/cgroup/user.slice/user-$UID.slice/user@$UID.service/app.slice/$CONTAINER_NAME). But we manually create the groups, which can cause issues on new installations or some operating systems, where this structure isn’t created yet. This is pparticularly important for the [...]/users.slice/user-$UID.slice directory because only the root user has access to the parent directory of this.
To fix this, we should default to using systemd (like systemd-run) or a tool like cgmanager that in turn relies on systemd to create, update, and delete cgroups.
Foxbox uses the systemd directory structure for managing cgroups (namely
/sys/fs/cgroup/user.slice/user-$UID.slice/user@$UID.service/app.slice/$CONTAINER_NAME). But we manually create the groups, which can cause issues on new installations or some operating systems, where this structure isn’t created yet. This is pparticularly important for the[...]/users.slice/user-$UID.slicedirectory because only the root user has access to the parent directory of this.To fix this, we should default to using systemd (like
systemd-run) or a tool likecgmanagerthat in turn relies on systemd to create, update, and delete cgroups.