[systemd-devel] Manual start of user@<uid>.service failed with permission denied

Christopher Wong Christopher.Wong at axis.com
Thu Dec 7 18:29:57 UTC 2023


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 <lennart at poettering.net>
Date: Wednesday, 6 December 2023 at 16:50
To: Christopher Wong <Christopher.Wong at axis.com>
Cc: systemd-devel at lists.freedesktop.org <systemd-devel at 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.Wong at axis.com) wrote:

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

Why would you do that?

user at .service automatically pulls in user-runtime-dir at .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 at .service is really just for regular users, not system users,
hence my question.

Lennart

--
Lennart Poettering, Berlin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20231207/cfa77f2a/attachment.htm>


More information about the systemd-devel mailing list