[systemd-devel] How to allow a user to use journalctl to see user-specific systemd service logs?
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
Sep 30 23:09:14 hostname systemd: Stopped a test service.
Sep 30 23:09:46 hostname systemd: 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
> > 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 .
>  https://github.com/systemd/systemd/issues/3281
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the systemd-devel