Bug 1262665 - /var/lib/systemd/journal-upload directory should have permission 0755
/var/lib/systemd/journal-upload directory should have permission 0755
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: systemd (Show other bugs)
24
All Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: systemd-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-13 22:41 EDT by Yu Watanabe
Modified: 2017-01-11 20:29 EST (History)
7 users (show)

See Also:
Fixed In Version: systemd-232-2.fc26
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-01-11 20:29:09 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch for systemd.spec (rawhide) (609 bytes, patch)
2015-09-13 22:47 EDT, Yu Watanabe
no flags Details | Diff

  None (edit)
Description Yu Watanabe 2015-09-13 22:41:32 EDT
Description of problem:

/var/lib/systemd/journal-upload is created with wrong attribute 0644. It should be 0755. This cause systemd-journal-upload.service fail.

Version-Release number of selected component (if applicable):
systemd-journal-gateway-216-25.fc21.x86_64
systemd-journal-gateway-219-23.fc22.x86_64
systemd-journal-gateway-222-2.fc23.x86_64
systemd-journal-gateway-226-1.fc24.x86_64

How reproducible:

Steps to Reproduce:
1. Install systemd-journal-gateway
2.
3.

Actual results:

$ ls -l /var/lib/systemd | grep journal
drw-r--r-- 2 systemd-journal-upload systemd-journal-upload 4096 Sep  2 22:33 journal-upload

Expected results:
drwxr-xr-x 2 systemd-journal-upload systemd-journal-upload 4096 Sep  2 22:33 journal-upload

Additional info:

For rawhide,
http://pkgs.fedoraproject.org/cgit/systemd.git/tree/systemd.spec?id=41553e0ec20285504b5877172be59a736fde7811#n773
On line 773,
-----
%dir %attr(0644,systemd-journal-upload,systemd-journal-upload) %{_localstatedir}/lib/systemd/journal-upload
-----
should be
-----
%dir %attr(0755,systemd-journal-upload,systemd-journal-upload) %{_localstatedir}/lib/systemd/journal-upload
-----
Comment 1 Yu Watanabe 2015-09-13 22:47:19 EDT
Created attachment 1073046 [details]
patch for systemd.spec (rawhide)

I expect the patch can be also applied for f21-23.
Comment 2 Yu Watanabe 2016-10-13 01:57:43 EDT
This causes journal-remote crash when we update systemd-journal-remote.

Currently, updating process does the following.
1. systemd-journal-remote RPM package create /var/lib/systemd/journal-upload with 0644.
2. 'systemd-tmpfiles --create' command in the pre-script of systemd package maintains the permission from 0644 to 0755.

There exist a time lag between these steps. So, during the lag, journal-upload cannot save the state to /var/lib/systemd/journal-upload/state.

Below is the part of journal log during the updating process of systemd-*
====
dbus-daemon[355]: [system] Reloaded configuration
dbus-daemon[355]: [system] Reloaded configuration
dbus-daemon[355]: [system] Reloaded configuration
dbus-daemon[355]: [system] Reloaded configuration
systemd[1]: Reexecuting.
systemd[1]: systemd 231 running in system mode. (+PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN)
systemd[1]: Detected architecture x86-64.
dbus-daemon[355]: [system] Reloaded configuration
dbus-daemon[355]: [system] Reloaded configuration
dbus-daemon[355]: [system] Reloaded configuration
dbus-daemon[355]: [system] Reloaded configuration
systemd[1]: Reloading.
systemd-journal-upload[560]: Failed to save state /var/lib/systemd/journal-upload/state: Permission denied
systemd[1]: systemd-journal-upload.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: systemd-journal-upload.service: Unit entered failed state.
systemd[1]: systemd-journal-upload.service: Failed with result 'exit-code'.
systemd[1]: Stopping udev Kernel Device Manager...
systemd[1]: Stopped udev Kernel Device Manager.
systemd[1]: Starting udev Kernel Device Manager...
systemd[1]: Started udev Kernel Device Manager.
systemd[1]: Reloading.
====
Comment 3 Yu Watanabe 2016-11-04 08:09:19 EDT
This bug is still not resolved in 232-1 for rawhide. Please fix it.

Note You need to log in before you can comment on or make changes to this bug.