[arch-general] [ Pacman -Syu ] Creating temporary files..., error: command failed to execute correctly

Xianwen Chen (陈贤文) xianwen.chen at gmail.com
Sat Sep 7 18:09:03 UTC 2019


Dear Ralph,

Thank you very much for the lecture!

It seems that the issue may be permissions.

     $ sudo /usr/bin/systemd-tmpfiles --create /run/tmpfiles.d/kmod.conf

Arch returns:

     Detected unsafe path transition / → /dev during canonicalization of 
/dev.
     Detected unsafe path transition / → /dev during canonicalization of 
/dev.
     Detected unsafe path transition / → /dev during canonicalization of 
/dev.
     Detected unsafe path transition / → /dev during canonicalization of 
/dev.
     Detected unsafe path transition / → /dev during canonicalization of 
/dev.

     $ cat /run/tmpfiles.d/kmod.conf
     c! /dev/fuse 0600 - - - 10:229
     c! /dev/cuse 0600 - - - 10:203
     c! /dev/btrfs-control 0600 - - - 10:234
     c! /dev/nvram 0600 - - - 10:144
     c! /dev/loop-control 0600 - - - 10:237
     d /dev/net 0755 - - -
     c! /dev/net/tun 0600 - - - 10:200
     c! /dev/ppp 0600 - - - 108:0
     c! /dev/uinput 0600 - - - 10:223
     d /dev/mapper 0755 - - -
     c! /dev/mapper/control 0600 - - - 10:236
     d /dev/vfio 0755 - - -
     c! /dev/vfio/vfio 0600 - - - 10:196
     c! /dev/userio 0600 - - - 10:240
     c! /dev/vhci 0600 - - - 10:137
     c! /dev/uhid 0600 - - - 10:239
     c! /dev/vhost-net 0600 - - - 10:238
     c! /dev/vhost-vsock 0600 - - - 10:241
     d /dev/snd 0755 - - -
     c! /dev/snd/timer 0600 - - - 116:33
     d /dev/snd 0755 - - -
     c! /dev/snd/seq 0600 - - - 116:1

There are more error messages of unsafe path transition if I run

$ sudo /usr/bin/systemd-tmpfiles --create

without specifying a tmpfile, then all tmpfiles are triggered.

After searching on-line, it seemed that similar problems were reported 
by other users of systemd. The fix is to set owner of / as root.root. I 
tried the solution and it worked! Running

$ sudo /usr/bin/systemd-tmpfiles --create

no longers gives me error message!

Yours sincerely,

Xianwen


On 07/09/2019 15.07, Ralph Corderoy wrote:
> Dear Xianwen,
>
>> :: Running post-transaction hooks...
> ...
>> (5/9) Creating temporary files...
>> error: command failed to execute correctly
>> (6/9) Reloading device manager configuration...
> Here's the path I trod to investigate this.
>
>      $ cd /usr/share/libalpm/hooks
>      $ grep 'Creating temporary files' *
>      systemd-tmpfiles.hook:Description = Creating temporary files...
>      $
>      $ cat systemd-tmpfiles.hook
>      [Trigger]
>      Type = File
>      Operation = Install
>      Operation = Upgrade
>      Target = usr/lib/tmpfiles.d/*.conf
>
>      [Action]
>      Description = Creating temporary files...
>      When = PostTransaction
>      Exec = /usr/share/libalpm/scripts/systemd-hook tmpfiles
>      $
>      $ file /usr/share/libalpm/scripts/systemd-hook
>      /usr/share/libalpm/scripts/systemd-hook: POSIX shell script, ASCII text executable
>      $
>      $ grep -1 tmpfiles /usr/share/libalpm/scripts/systemd-hook
>        sysusers) /usr/bin/systemd-sysusers ;;
>        tmpfiles) /usr/bin/systemd-tmpfiles --create ;;
>
>      $
>      $ man systemd-tmpfiles
>      ...
>      DESCRIPTION
> 	   systemd-tmpfiles creates, deletes, and cleans up volatile and
> 	   temporary files and directories, based on the configuration file
> 	   format and location specified in tmpfiles.d(5).
>
>      $ man 5 tmpfiles.d
>      ...
>      SYNOPSIS
> 	   /etc/tmpfiles.d/*.conf
> 	   /run/tmpfiles.d/*.conf
> 	   /usr/lib/tmpfiles.d/*.conf
>
> 	   ~/.config/user-tmpfiles.d/*.conf
> 	   $XDG_RUNTIME_DIR/user-tmpfiles.d/*.conf
> 	   ~/.local/share/user-tmpfiles.d/*.conf
> 	   ...
> 	   /usr/share/user-tmpfiles.d/*.conf
>
> So one of the *.conf files in those directory is triggering that error.
> systemd-tmpfiles(8) says one or more *.conf files can be given after
> ‘--create’ so I suggest running it on each in turn to see if the
> error still occurs for one of them.  This may required sudo(8).
>


More information about the arch-general mailing list