You are not logged in.

#1 2013-10-17 11:39:59

cooljay032
Member
Registered: 2013-04-15
Posts: 8

system journal - correct permission only after first "vacuuming"

hi there,

after fixing problem as decribed here https://bbs.archlinux.org/viewtopic.php?pid=1335223 i still have no user access after fresh boot:

[vdr@vdr ~]$ ll /run/log/journal/*
insgesamt 1988
drwxr-sr-x 2 root systemd-journal      60 17. Okt 12:41 .
drwxr-sr-x 3 root systemd-journal      60 17. Okt 12:41 ..
-rw-r----- 1 root root            2035712 17. Okt 12:43 system.journal
[vdr@vdr ~]$ stat -c "%a %U %G" /run/log/journal/d04346cb5efafe031916166000000371/system.journal
640 root root

[vdr@vdr ~]$ journalctl
No journal files were found.

journal sub-dir(s) are ok, but the journal itself is still owned by root:root instead of root:systemd-journal ??
once journal is vaccuumed the new created journalfile is ok:

[vdr@vdr ~]$ dmesg
...
[  784.089358] systemd-journald[120]: Vacuuming done, freed 0 bytes
[  784.148181] systemd-journald[120]: Failed to write entry (26 items, 94372466 bytes) despite vacuuming, ignoring: Argument list too long

[vdr@vdr ~]$
[vdr@vdr ~]$ ll /run/log/journal/*
insgesamt 3360
drwxr-sr-x 2 root systemd-journal      80 17. Okt 12:54 .
drwxr-sr-x 3 root systemd-journal      60 17. Okt 12:41 ..
-rw-r----- 1 root root            2736128 17. Okt 12:54 system@8c52f0e402304b20a2310bb403e4194d-0000000000000001-0004e8ed75d76e1e.journal
-rw-r----- 1 root systemd-journal  704512 17. Okt 12:57 system.journal
[vdr@vdr ~]$
[vdr@vdr ~]$ stat -c "%a %U %G" /run/log/journal/d04346cb5efafe031916166000000371/system.journal

640 root systemd-journal
[vdr@vdr ~]$

weird... any ideas??

so long,
lars

Offline

#2 2013-10-20 22:49:15

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,129

Re: system journal - correct permission only after first "vacuuming"

Welcome to the forums.

Which fix did you apply? Several possibilities are mentioned in that thread only some of which would be expected to survive a reboot.

If, for example, you used chown to change the ownership of stuff under /run/log..., that would disappear on reboot. If, on the other hand, you tweaked the setup by adding something under /etc/tmpfiles.d or changed the file under /usr/lib/tmpfiles.d, then that should persist.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#3 2013-10-24 18:06:35

cooljay032
Member
Registered: 2013-04-15
Posts: 8

Re: system journal - correct permission only after first "vacuuming"

thanks smile

I fixed it by tweaking the tmpfiles config:

[vdr@vdr ~]$ cat /usr/lib/tmpfiles.d/systemd.conf 
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

# See tmpfiles.d(5) for details

d /run/user 0755 root root ~10d
F /run/utmp 0664 root utmp -

f /var/log/wtmp 0664 root utmp -
f /var/log/btmp 0600 root utmp -

d /var/cache/man - - - 30d

d /run/systemd/ask-password 0755 root root -
d /run/systemd/seats 0755 root root -
d /run/systemd/sessions 0755 root root -
d /run/systemd/users 0755 root root -
d /run/systemd/machines 0755 root root -
d /run/systemd/shutdown 0755 root root -

F /run/nologin 0644 - - - "System is booting up. See pam_nologin(8)"

m /var/log/journal 2755 root systemd-journal - -
m /var/log/journal/%m 2755 root systemd-journal - -
m /run/log/journal 2755 root systemd-journal - -
m /run/log/journal/%m 2755 root systemd-journal - -

Like i said that works for the /run/log/journal dir, but the journal file iss still owned by root:root at least till new journal is created.

Offline

#4 2013-10-24 23:30:20

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,129

Re: system journal - correct permission only after first "vacuuming"

So can you specify the file in the configuration, as well? I guess if the journal file already exists, your configuration won't alter that as it stands.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

Board footer

Powered by FluxBB