Results 1 to 7 of 7

Thread: tmpfiles problem

  1. #1
    Join Date
    Nov 2018
    Beans
    2

    tmpfiles problem

    After last update there is become a problem: systemd-tmpfiles not starts (so there is no temp dirs and some services can't be started).

    Code:
    root@myserver:/# journalctl -b 0 -u systemd-tmpfiles-setup.service
    -- Logs begin at Ср 2018-11-21 01:00:51 MSK, end at Ср 2018-11-21 11:45:01 MSK. --
    ноя 21 01:01:04 myserver systemd[1]: Starting Create Volatile Files and Directories...
    ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /var/log, refusing.
    ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /var/lib, refusing.
    ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /run/sendsigs.omit.d, refusing.
    ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /run/lock/subsys, refusing.
    ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /run/lock/lvm, refusing.
    ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /run/lvm, refusing.
    ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /var/cache, refusing.
    ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /var/cache/man, refusing.
    ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /run/php, refusing.
    ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /run/rpcbind, refusing.
    ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /run/rpcbind/rpcbind.xdr, refusing.
    ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /run/rpcbind/portmap.xdr, refusing.
    ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /run/samba, refusing.
    ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /var/run/screen, refusing.
    ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /var/run/sshd, refusing.
    ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /var/run/sudo, refusing.
    ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /var/run/sudo/ts, refusing.
    ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /run/nologin, refusing.
    ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /run/user, refusing.
    ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /run/utmp, refusing.
    ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /run/systemd/ask-password, refusing.
    ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /run/systemd/seats, refusing.
    ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /run/systemd/sessions, refusing.
    ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /run/systemd/users, refusing.
    ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /run/systemd/machines, refusing.
    ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /run/systemd/shutdown, refusing.
    ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /run/systemd/netif, refusing.
    ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /run/systemd/netif/links, refusing.
    ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /run/systemd/netif/leases, refusing.
    ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /run/log, refusing.
    ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /var/lib/systemd, refusing.
    ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /var/lib/systemd/coredump, refusing.
    ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /var/log/wtmp, refusing.
    ноя 21 01:01:04 myserver systemd-tmpfiles[1040]: Unsafe symlinks encountered in /var/log/btmp, refusing.
    ноя 21 01:01:04 myserver systemd[1]: systemd-tmpfiles-setup.service: Main process exited, code=exited, status=1/FAILURE
    ноя 21 01:01:04 myserver systemd[1]: Failed to start Create Volatile Files and Directories.
    ноя 21 01:01:04 myserver systemd[1]: systemd-tmpfiles-setup.service: Unit entered failed state.
    ноя 21 01:01:04 myserver systemd[1]: systemd-tmpfiles-setup.service: Failed with result 'exit-code'.
    I was trying to run separate config files
    Code:
    root@myserver:/# systemd-tmpfiles --create /usr/lib/tmpfiles.d/sshd.conf
    Unsafe symlinks encountered in /var/run/sshd, refusing.
    /var/run/sshd is empty. There is no symlinks at all.

    I've no idea what its means and how to fix it. So I will be glad to any advice.

    Code:
    root@myserver:/# uname -a
    Linux myserver 4.4.0-139-generic #165-Ubuntu SMP Wed Oct 24 10:58:50 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
    Last edited by loki2100; November 21st, 2018 at 01:53 PM.

  2. #2
    Join Date
    Nov 2018
    Beans
    2

    Re: tmpfiles problem

    Well. Problem is the root folder has user as an owner.
    Code:
    root@myserver:~# stat -c "%U %G" /
    user user
    Solution is:
    Code:
    root@myserver:~# chown root:root /
    root@myserver:~# stat -c "%U %G" /
    root root
    
    root@myserver:~# systemctl start systemd-tmpfiles-setup
    root@myserver:~#

  3. #3
    Join Date
    Oct 2006
    Beans
    58,344

    Re: tmpfiles problem

    Thread moved to the "Server Platforms" forum.

    Congrats on solving.

  4. #4
    Join Date
    Dec 2018
    Beans
    1

    Re: tmpfiles problem

    Any chance you might share how you got from point A to point B here. I encountered the same issue and while glad for the fix do not understand how you identified that problem.. or was it a lucky catch?

  5. #5
    Join Date
    Jun 2012
    Beans
    33

    Re: tmpfiles problem

    Quote Originally Posted by mystadm View Post
    Any chance you might share how you got from point A to point B here. I encountered the same issue and while glad for the fix do not understand how you identified that problem.. or was it a lucky catch?
    for me, it was not root dir that had incorrect ownership permission, rather it was /var/lib. It was owned by user dhcpd.

    very much agree. would be nice to learn how they managed to figure it out. either way, thank you for the solution.

  6. #6
    Join Date
    Jan 2011
    Beans
    7

    Re: tmpfiles problem

    amazing , non root ownership of root / was cause of my problem with php-fpm having died and not restarting. How on earth did that happen??

    php-fpm7.2[15693]: [25-Feb-2019 15:50:55] ERROR: unable to bind listening socket for address '/run/php/php7.2-fpm.sock': No such file or directory


    $ ll
    total 2097264
    drwxrwxr-x 24 1002 1001 4096 Feb 17 20:27 ./
    drwxrwxr-x 24 1002 1001 4096 Feb 17 20:27 ../
    drwxr-xr-x 2 root root 4096 Feb 19 06:32 bin/
    drwxr-xr-x 3 root root 4096 Feb 19 06:32 boot/
    ...

  7. #7
    Join Date
    Sep 2019
    Beans
    1

    Re: tmpfiles problem

    I just had this problem, but the affected directory was /run, which was suddenly owned by clamav. Thanks for the solution, now to check on clamav...

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •