Hi Lennart,

We are doing the steps to start up a rootless docker. If I don’t set 
XDG_RUNTIME_DIR then I will get the below error:

systemd[1925]: Trying to run as user instance, but $XDG_RUNTIME_DIR is not set.

The 503 is a system user. So, just to try it out, I created a user, which got 
the UID 1001. Using that UID gave me the same result as the 503.

Best regards,
Christopher Wong



From: Lennart Poettering <lenn...@poettering.net>
Date: Wednesday, 6 December 2023 at 16:50
To: Christopher Wong <christopher.w...@axis.com>
Cc: systemd-devel@lists.freedesktop.org <systemd-devel@lists.freedesktop.org>
Subject: Re: [systemd-devel] Manual start of user@<uid>.service failed with 
permission denied
On Mi, 06.12.23 14:46, Christopher Wong (christopher.w...@axis.com) wrote:

> Hi,
>
> I’m trying to do the following:
>
> root@host:~# systemctl set-environment
> XDG_RUNTIME_DIR="/run/user/503"

Why would you do that?

user@.service automatically pulls in user-runtime-dir@.service which
is responsible for creating that dir with right perms.

is 504 a system user? or a regular user?

systemd generally assumes the boundary between system and regular
users is between 999 and 1000.

But user@.service is really just for regular users, not system users,
hence my question.

Lennart

--
Lennart Poettering, Berlin

Reply via email to