Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#47162 - [systemd] journal-remote is missing write permissions to /var/log/journal/remote

Attached to Project: Arch Linux
Opened by Daniel Speichert (dasp) - Monday, 23 November 2015, 21:17 GMT
Last edited by freswa (frederik) - Sunday, 13 September 2020, 13:42 GMT
Task Type Bug Report
Category Upstream Bugs
Status Assigned   Reopened
Assigned To Christian Hesse (eworm)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No


systemd-journal-remote is missing write permissions to /var/log/journal/remote

Default permissions for /var/log/journal/remote
File: ‘/var/log/journal/remote/’
Size: 0 Blocks: 0 IO Block: 4096 directory
Device: 14h/20d Inode: 1540369 Links: 1
Access: (2775/drwxrwsr-x) Uid: ( 0/ root) Gid: ( 999/systemd-journal-remote)

Setting owner on /var/log/journal/remote to systemd-journal-remote fixes the problem.

Additional info:
* package version(s)
systemd: 227-1
* config and/or log files etc.

Nov 23 21:58:03 test1 systemd-journal-remote[23567]: Failed to open output journal /var/log/journal/remote//remote-test1.journal: Permission denied
Nov 23 21:58:04 test1 systemd-journal-remote[23567]: Failed to get writer for source test1: Permission denied

Steps to reproduce:
* Get systemd-journal-remote and systemd-journal-upload to work
* Check journal on systemd-journal-remote's host
This task depends upon

Comment by Dave Reisner (falconindy) - Friday, 27 November 2015, 15:54 GMT
The directory /var/log/journal/remote isn't shipped with systemd. What creates it?
Comment by Daniel Speichert (dasp) - Saturday, 22 April 2017, 14:52 GMT
systemd-journal-remote creates the directory
Comment by Doug Newgard (Scimmia) - Saturday, 22 April 2017, 14:53 GMT
So the program makes a dir it can't access? That makes no sense what so ever. At the very least, it's an upstream issue if it's an issue at all.
Comment by Dave Reisner (falconindy) - Saturday, 22 April 2017, 15:09 GMT
> systemd-journal-remote creates the directory
I strongly dispute that... the manpage even says the output directory must already exist.

Since dcdd4411407067fa1e464dc26ab85ae598fcad7d, tmpfiles fragments set ownership to systemd-journal-remote:systemd-journal-remote. What happens if you run:

SYSTEMD_LOG_LEVEL=debug systemd-tmpfiles --create /lib/tmpfiles.d/systemd-remote.conf

Do the permissions get fixed? Do you have any files in /etc/tmpfiles.d?

Definitely missing some information here...