FS#38788 - [systemd] journalctl does not work as non root user

Attached to Project: Arch Linux
Opened by Nicola (drakkan) - Tuesday, 04 February 2014, 13:09 GMT
Last edited by Dave Reisner (falconindy) - Saturday, 08 February 2014, 19:11 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Dave Reisner (falconindy)
Tom Gundersen (tomegun)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

after setting Storage=volatile in /etc/systemd/journald.conf

journatcl does not work anymore as normal user, this is a permission issue:

ls -la /run/log/journal/7d6bbc328aa14a9da93dc60ba990adf6/system.journal
-rw-r----- 1 root root 4120576 4 feb 13.59 /run/log/journal/7d6bbc328aa14a9da93dc60ba990adf6/system.journal

only root can read system.journal

chmod 644 on system.journal make normal user able to use journalctl again

Additional info:

systemd 208-10


Steps to reproduce:

set Storage=volatile in /etc/systemd/journald.conf

run as non root user:

journalctl -f

you'll get:

No journal files were found.

if you run the same command as root it works as expected
This task depends upon

Closed by  Dave Reisner (falconindy)
Saturday, 08 February 2014, 19:11 GMT
Reason for closing:  Duplicate
Additional comments about closing:   FS#37170 
Comment by Dave Reisner (falconindy) - Tuesday, 04 February 2014, 15:06 GMT
I suspect this is working as intended, but I can't yet find the documentation to support my claim.

If you want unprivileged access, you need to use persistent storage.
Comment by Dave Reisner (falconindy) - Tuesday, 04 February 2014, 15:54 GMT
The source of all truth is, of course, the source: https://github.com/systemd/systemd/blob/master/src/journal/journalctl.c#L1513

There's also an offhand reference to this in journald.conf(5) in the description of the SplitMode option.
Comment by Nicola (drakkan) - Tuesday, 04 February 2014, 16:08 GMT
in my case in_group("systemd-journal") should be > 0 since my user is in systemd-journal group
Comment by Nicola (drakkan) - Tuesday, 04 February 2014, 16:10 GMT
I asked directly on github to be sure

https://github.com/systemd/systemd/issues/9
Comment by Dave Reisner (falconindy) - Tuesday, 04 February 2014, 16:16 GMT
> in my case in_group("systemd-journal") should be > 0 since my user is in systemd-journal group
/usr/lib/tmpfiles.d/systemd.conf applies this group permission. Can you confirm that it's actually there?

The github repo is just a mirror, you likely aren't going to get much of a response there. Discussion takes place on systemd-devel@lists.freedesktop.org.

Loading...