Hi Mantas, I tried with StopWhenUnneeded=no in
user-runtime-dir@.service, then when
user@1001.service fails the status of
user-runtime-dir@.service is active. At this state the directory /run/user/1001 is created, it is empty, owned by root. Running the mount command doesn’t show /run/user/1001. ● user-runtime-dir@1001.service - User Runtime Directory /run/user/1001 Loaded: loaded (/etc/systemd/system/user-runtime-dir@.service; static) Drop-In: /usr/lib/systemd/system/service.d └─10-axis.conf, 20-axis-sandbox.conf Active: active (exited) since Wed 2023-12-13 09:16:57 CET; 33s ago Docs: man:user@.service(5) Process: 133303 ExecStartPre=ls -la /run/user (code=exited, status=0/SUCCESS) Process: 133305 ExecStartPre=mount (code=exited, status=0/SUCCESS) Process: 133307 ExecStart=/usr/lib/systemd/systemd-user-runtime-dir start 1001 (code=exited, status=0/SUCCESS) Process: 133309 ExecStartPost=ls -la /run/user/1001 (code=exited, status=0/SUCCESS) Process: 133310 ExecStartPost=mount (code=exited, status=0/SUCCESS) Main PID: 133307 (code=exited, status=0/SUCCESS) CPU: 209ms I have mentioned it before, but I want to point out that if I put “ExecStartPre=+chown
%i /run/user/%i” in
user@.service then the
user@1001.service can be started manually. The mount command doesn’t show /run/user/1001 either, but since the service is started the path contains bus socket and systemd directory with content, which are the things I am after.
The main issue here is that /run/user/1001 is owned by root after
user-runtime-dir@.service has been exited successfully. Best regards, Christopher Wong From:
Mantas Mikulėnas <grawity@xxxxxxxxx> On Tue, Dec 12, 2023 at 6:15 PM Christopher Wong <Christopher.Wong@xxxxxxxx> wrote: Ah yeah, that makes sense, user-runtime-dir@ has StopWhenUnneeded=yes – so of course after user@1001 crashes you're not going to see anything mounted anymore. Could you try temporarily removing that option / setting it to 'no', just to see what changes?
Mantas Mikulėnas |
Hi Mantas, I tried with StopWhenUnneeded=no in
user-runtime-dir@.service, then when
user@1001.service fails the status of
user-runtime-dir@.service is active. At this state the directory /run/user/1001 is created, it is empty, owned by root. Running the mount command doesn’t show /run/user/1001. ● user-runtime-dir@1001.service - User Runtime Directory /run/user/1001 Loaded: loaded (/etc/systemd/system/user-runtime-dir@.service; static) Drop-In: /usr/lib/systemd/system/service.d └─10-axis.conf, 20-axis-sandbox.conf Active: active (exited) since Wed 2023-12-13 09:16:57 CET; 33s ago Docs: man:user@.service(5) Process: 133303 ExecStartPre=ls -la /run/user (code=exited, status=0/SUCCESS) Process: 133305 ExecStartPre=mount (code=exited, status=0/SUCCESS) Process: 133307 ExecStart=/usr/lib/systemd/systemd-user-runtime-dir start 1001 (code=exited, status=0/SUCCESS) Process: 133309 ExecStartPost=ls -la /run/user/1001 (code=exited, status=0/SUCCESS) Process: 133310 ExecStartPost=mount (code=exited, status=0/SUCCESS) Main PID: 133307 (code=exited, status=0/SUCCESS) CPU: 209ms I have mentioned it before, but I want to point out that if I put “ExecStartPre=+chown
%i /run/user/%i” in
user@.service then the
user@1001.service can be started manually. The mount command doesn’t show /run/user/1001 either, but since the service is started the path contains bus socket and systemd directory with content, which are the things I am after.
The main issue here is that /run/user/1001 is owned by root after
user-runtime-dir@.service has been exited successfully. Best regards, Christopher Wong |