View previous topic :: View next topic |
Author |
Message |
yango Tux's lil' helper


Joined: 09 Nov 2020 Posts: 79
|
Posted: Thu Apr 01, 2021 3:26 pm Post subject: [SOLVED] systemd-tmpfiles failed |
|
|
Hello!
virtual/tmpfiles is a package pulled by services like fail2ban, it creates a openrc service: stmpfiles-setup that fail when I mount /var on a separated partition and make fail2ban service crash if I execute it before stmpfiles-setup.
Code: |
# cat stmpfiles-setup
description="Set up tmpfiles.d entries"
depend()
{
provide stmpfiles-setup stmpfiles.setup tmpfiles-setup tmpfiles.setup
need localmount
}
start()
{
ebegin "Setting up tmpfiles.d entries"
/bin/systemd-tmpfiles --exclude-prefix=/dev --create --remove --boot \
${stmpfiles_opts}
eend $?
}
|
The rc.log is:
Code: |
* Setting up tmpfiles.d entries ...
Detected unsafe path transition /var /var/lib during canonicalization of /var/lib.
Detected unsafe path transition /var /var/cache during canonicalization of /var/cache.
Detected unsafe path transition /var /var/cache during canonicalization of /var/cache.
[ !! ]
* ERROR: stmpfiles-setup failed to start
* Starting fail2ban ...
Server ready
|
Is stmpfiles-setup service indispensable? should I fix it? could I omit it?
Last edited by yango on Sat Apr 03, 2021 7:21 pm; edited 1 time in total |
|
Back to top |
|
 |
alamahant Advocate

Joined: 23 Mar 2019 Posts: 3958
|
Posted: Sat Apr 03, 2021 2:09 pm Post subject: |
|
|
Are you running openrc or systemd?
I am confused....
please try
Code: |
ls -ld /var
ls -l /var
|
_________________

Last edited by alamahant on Sat Apr 03, 2021 2:26 pm; edited 1 time in total |
|
Back to top |
|
 |
hdcg Tux's lil' helper

Joined: 07 Apr 2013 Posts: 121
|
|
Back to top |
|
 |
yango Tux's lil' helper


Joined: 09 Nov 2020 Posts: 79
|
Posted: Sat Apr 03, 2021 7:19 pm Post subject: |
|
|
I'm running openrc.
Code: |
# ls -ld /var
drwxr-xr-x. 11 nginx nginx 4096 Mar 1 19:53 /var
# chown root:root /var
# rc-service stmpfiles-setup restart
* WARNING: you are stopping a boot service
* Setting up tmpfiles.d entries ... [ ok ]
|
It was an ownership error, surely I commit it configuring Nginx server.
Thank you all! |
|
Back to top |
|
 |
Ionen Developer


Joined: 06 Dec 2018 Posts: 2904
|
Posted: Sat Apr 03, 2021 7:33 pm Post subject: |
|
|
alamahant wrote: | Are you running openrc or systemd? | systemd-tmpfiles is something you use only without systemd because systemd otherwise provide it, so definitely not systemd (same idea as sys-fs/udev).
opentmpfiles has some issues and limitations that nobody really been fixing, so systemd-tmpfiles became the default for virtual/tmpfiles (used by new installations only unless you manually migrate for now). It's the reference implementation and can function without having systemd installed, so there was no point in reinventing the wheel further Code: | RDEPEND="
|| (
sys-apps/systemd-tmpfiles
sys-apps/opentmpfiles
sys-apps/systemd
)" |
|
|
Back to top |
|
 |
|