[systemd-devel] How to allow a user to use journalctl to see user-specific systemd service logs?

Daniel Ng danielng56 at gmail.com
Mon Oct 3 22:16:33 UTC 2016

I actually meant to say "systemctl --user start test.*service*"
In Ubuntu 16.04 system with systemd 229, I was able to bypass the
permission error by adding the user to group "adm", but now the user can
see the journal of system units as  well.

One weird thing now is that
"journalctl --user-unit test.service" will only show systemd message, not
the stdout / stderr of the test process

for example:
Sep 30 23:09:14 hostname systemd[10551]: Stopped a test service.
Sep 30 23:09:46 hostname systemd[10551]: Started a test service.

This is my test.service
Description=a test service

ExecStart=/bin/echo test something


According to #3281 <https://github.com/systemd/systemd/issues/3281>, it
seems this could be solved by changing the journal store to non-volatile.
I am going to try it.

On Mon, Oct 3, 2016 at 5:13 PM, Stefan Schweter <stefan at schweter.it> wrote:

> On 03.10.2016 20:59, Daniel Ng wrote:
> >     journalctl --user -u test.service
> >     Hint: You are currently not seeing messages from other users and the
> > system.
> >       Users in the 'systemd-journal' group can see all messages. Pass -q
> to
> >       turn off this notice.
> >     No journal files were opened due to insufficient permissions.
> >
> I could reproduce the problem on a Ubuntu 16.04 system with systemd 229.
> Please also have a look at this issue on GitHub [1].
> Regards,
> Stefan
> [1] https://github.com/systemd/systemd/issues/3281
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20161003/024420b3/attachment.html>

More information about the systemd-devel mailing list