You are not logged in.

#1 2020-06-04 01:37:52

snap.ve
Member
Registered: 2020-04-02
Posts: 76

[SOLVED] Failed to copy files to /etc/motd

Hello everyone! Recently i tried to upgrade with pacman -Syu. Everything went well except for notification in pacman

(13/19) Creating temporary files...
error: command failed to execute correctly

Everything was updated, but I want to know what kind of error it is
I started looking for a solution and found this and this methods
The first one did not help me, /usr/share/info/dir wasn't empty. Second solution, still not resolved and created 2 yhr ago, but. They recommended do command

/usr/bin/systemd-tmpfiles --create

I did that, and get error - Failed to copy files to /etc/motd: No such file or directory
I'll try create motd file it wasn't help
How can i fix this?

Last edited by snap.ve (2020-06-04 15:43:28)

Offline

#2 2020-06-04 02:54:08

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,534
Website

Re: [SOLVED] Failed to copy files to /etc/motd

Please post the output of each of the following:

find /etc/tmpfiles.d /run/tmpfiles.d /usr/lib/tmpfiles.d/ -name '*.conf' -exec grep motd '{}' \+

stat /etc/motd

stat /etc

"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2020-06-04 05:04:18

loqs
Member
Registered: 2014-03-06
Posts: 17,378

Re: [SOLVED] Failed to copy files to /etc/motd

Also the output of

ls -la /usr/share/factory/etc/

Offline

#4 2020-06-04 11:12:30

snap.ve
Member
Registered: 2020-04-02
Posts: 76

Re: [SOLVED] Failed to copy files to /etc/motd

Trilby wrote:

Please post the output of each of the following:

find /etc/tmpfiles.d /run/tmpfiles.d /usr/lib/tmpfiles.d/ -name '*.conf' -exec grep motd '{}' \+
/usr/lib/tmpfiles.d/arch.conf:C /etc/motd
Trilby wrote:
stat /etc/motd
stat: cannot statx '/etc/motd': No such file or directory
Trilby wrote:
stat /etc/motd
  File: /etc
  Size: 4096      	Blocks: 8          IO Block: 4096   directory
Device: fe01h/65025d	Inode: 263103      Links: 71
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2020-05-30 21:29:06.887774432 +0300
Modify: 2020-06-04 14:03:30.608101422 +0300
Change: 2020-06-04 14:03:30.608101422 +0300
 Birth: 2020-02-05 23:34:03.198653326 +0300

If i create a motd file manually, stat /etc/motd shows me

  File: /etc/motd
  Size: 0         	Blocks: 0          IO Block: 4096   regular empty file
Device: fe01h/65025d	Inode: 270058      Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2020-06-04 14:17:38.885667220 +0300
Modify: 2020-06-04 14:17:38.885667220 +0300
Change: 2020-06-04 14:17:41.722643190 +0300
 Birth: 2020-06-04 14:17:38.885667220 +0300

Last edited by snap.ve (2020-06-04 11:19:54)

Offline

#5 2020-06-04 11:15:09

snap.ve
Member
Registered: 2020-04-02
Posts: 76

Re: [SOLVED] Failed to copy files to /etc/motd

loqs wrote:

Also the output of

ls -la /usr/share/factory/etc/
total 72
drwxr-xr-x 3 root root 4096 May 29 22:47 .
drwxr-xr-x 3 root root 4096 Jul 28  2019 ..
-rw------- 1 root root  722 May 20 01:42 crypttab
-rw-r--r-- 1 root root  126 May 20 01:42 fstab
-rw-r--r-- 1 root root   14 May 20 01:42 group
-rw------- 1 root root   12 May 20 01:42 gshadow
-rw-r--r-- 1 root root   73 May 20 01:42 host.conf
-rw-r--r-- 1 root root   65 May 20 01:42 hosts
-rw-r--r-- 1 root root   20 May 20 01:42 issue
-rw-r--r-- 1 root root  117 May 20 01:42 ld.so.conf
-rw-r--r-- 1 root root  334 May 20 01:42 nsswitch.conf
drwxr-xr-x 2 root root 4096 Jun  4 05:27 pam.d
-rw-r--r-- 1 root root   28 May 20 01:42 passwd
-rw-r--r-- 1 root root  841 May 20 01:42 profile
-rw-r--r-- 1 root root   65 May 20 01:42 resolv.conf
-rw-r--r-- 1 root root  139 May 20 01:42 securetty
-rw------- 1 root root   19 May 20 01:42 shadow
-rw-r--r-- 1 root root   83 May 20 01:42 shells

Offline

#6 2020-06-04 11:25:41

schard
Forum Moderator
From: Hannover
Registered: 2016-05-06
Posts: 1,988
Website

Re: [SOLVED] Failed to copy files to /etc/motd

Update: I just realized that you already provided the needed info.

Please post the content of /usr/lib/tmpfiles.d/arch.conf and the output of mount.

Last edited by schard (2020-06-04 11:56:14)


macro_rules! yolo { { $($tokens:tt)* } => { unsafe { $($tokens)* } }; }

Offline

#7 2020-06-04 11:31:42

loqs
Member
Registered: 2014-03-06
Posts: 17,378

Re: [SOLVED] Failed to copy files to /etc/motd

The output of the following please:

pacman -Qikk filesystem

Offline

#8 2020-06-04 14:45:40

snap.ve
Member
Registered: 2020-04-02
Posts: 76

Re: [SOLVED] Failed to copy files to /etc/motd

schard wrote:

Update: I just realized that you already provided the needed info.

Please post the content of /usr/lib/tmpfiles.d/arch.conf and the output of mount.

# copy from factory when missing

C /etc/crypttab
C /etc/fstab
C /etc/group
C /etc/gshadow
C /etc/host.conf
C /etc/hosts
C /etc/issue
C /etc/ld.so.conf
C /etc/motd
C /etc/nsswitch.conf
C /etc/passwd
C /etc/profile
C /etc/securetty
C /etc/shadow
C /etc/shells
NAME              MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda                 8:0    0 119.2G  0 disk  
├─sda1              8:1    0   200M  0 part  /boot
├─sda2              8:2    0   9.8G  0 part  
│ └─volume        254:0    0   9.8G  0 crypt 
│   └─volume-root 254:1    0   9.8G  0 lvm   /
└─sda3              8:3    0 109.3G  0 part  /run/media/admin/DATA
sdb                 8:16   0 931.5G  0 disk  

Offline

#9 2020-06-04 14:47:02

snap.ve
Member
Registered: 2020-04-02
Posts: 76

Re: [SOLVED] Failed to copy files to /etc/motd

loqs wrote:

The output of the following please:

pacman -Qikk filesystem
pacman -Qikk filesystem
Name            : filesystem
Version         : 2020.05.20-1
Description     : Base Arch Linux files
Architecture    : x86_64
URL             : https://www.archlinux.org
Licenses        : GPL
Groups          : None
Provides        : None
Depends On      : iana-etc
Optional Deps   : None
Required By     : base  fakeroot  glibc  mkinitcpio
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 40.59 KiB
Packager        : Sébastien Luttringer <seblu@seblu.net>
Build Date      : Wed 20 May 2020 01:42:31 AM MSK
Install Date    : Fri 29 May 2020 09:48:05 PM MSK
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

warning: filesystem: /etc/arch-release (No such file or directory)
backup file: filesystem: /etc/fstab (Modification time mismatch)
backup file: filesystem: /etc/fstab (Size mismatch)
backup file: filesystem: /etc/group (Modification time mismatch)
backup file: filesystem: /etc/group (Size mismatch)
backup file: filesystem: /etc/gshadow (Modification time mismatch)
backup file: filesystem: /etc/gshadow (Size mismatch)
backup file: filesystem: /etc/hosts (Modification time mismatch)
backup file: filesystem: /etc/hosts (Size mismatch)
backup file: filesystem: /etc/motd (Modification time mismatch)
backup file: filesystem: /etc/passwd (Modification time mismatch)
backup file: filesystem: /etc/passwd (Size mismatch)
backup file: filesystem: /etc/resolv.conf (Modification time mismatch)
backup file: filesystem: /etc/resolv.conf (Size mismatch)
backup file: filesystem: /etc/shadow (Modification time mismatch)
backup file: filesystem: /etc/shadow (Size mismatch)
backup file: filesystem: /etc/shells (Modification time mismatch)
backup file: filesystem: /etc/shells (Size mismatch)
warning: filesystem: /mnt (No such file or directory)
warning: filesystem: /srv/ftp (No such file or directory)
warning: filesystem: /srv/http (No such file or directory)
warning: filesystem: /usr/local/bin (No such file or directory)
warning: filesystem: /usr/local/etc (No such file or directory)
warning: filesystem: /usr/local/games (No such file or directory)
warning: filesystem: /usr/local/include (No such file or directory)
warning: filesystem: /usr/local/lib (No such file or directory)
warning: filesystem: /usr/local/man (No such file or directory)
warning: filesystem: /usr/local/sbin (No such file or directory)
warning: filesystem: /usr/local/src (No such file or directory)
warning: filesystem: /usr/share/factory/etc/motd (No such file or directory)
warning: filesystem: /usr/share/misc (No such file or directory)
warning: filesystem: /usr/src (No such file or directory)
warning: filesystem: /var/games (No such file or directory)
warning: filesystem: /var/lib/misc (No such file or directory)
warning: filesystem: /var/local (No such file or directory)
warning: filesystem: /var/log/old (No such file or directory)
warning: filesystem: /var/opt (No such file or directory)
warning: filesystem: /var/spool/mail (No such file or directory)
filesystem: 116 total files, 21 altered files

Offline

#10 2020-06-04 14:50:01

loqs
Member
Registered: 2014-03-06
Posts: 17,378

Re: [SOLVED] Failed to copy files to /etc/motd

warning: filesystem: /usr/share/factory/etc/motd (No such file or directory)

Offline

#11 2020-06-04 15:26:46

snap.ve
Member
Registered: 2020-04-02
Posts: 76

Re: [SOLVED] Failed to copy files to /etc/motd

loqs wrote:
warning: filesystem: /usr/share/factory/etc/motd (No such file or directory)

Yas! Working! Thank you!
Btw, thats happened because i use self created script for cleaning system

#!/bin/bash
find / -type d -empty -not -path "/run/media/admin/DATA/*" -delete
find / -size 0 -delete
find / -name *.pacnew -delete

How can i exclude /usr/share/factory/etc/motd with find util?
And how critical is it if these empty files or folders are missing from the system?

warning: filesystem: /mnt (No such file or directory)
warning: filesystem: /srv/ftp (No such file or directory)
warning: filesystem: /srv/http (No such file or directory)
warning: filesystem: /usr/local/bin (No such file or directory)
warning: filesystem: /usr/local/etc (No such file or directory)
warning: filesystem: /usr/local/games (No such file or directory)
warning: filesystem: /usr/local/include (No such file or directory)
warning: filesystem: /usr/local/lib (No such file or directory)
warning: filesystem: /usr/local/man (No such file or directory)
warning: filesystem: /usr/local/sbin (No such file or directory)
warning: filesystem: /usr/local/src (No such file or directory)
warning: filesystem: /usr/share/factory/etc/motd (No such file or directory)
warning: filesystem: /usr/share/misc (No such file or directory)
warning: filesystem: /usr/src (No such file or directory)
warning: filesystem: /var/games (No such file or directory)
warning: filesystem: /var/lib/misc (No such file or directory)
warning: filesystem: /var/local (No such file or directory)
warning: filesystem: /var/log/old (No such file or directory)
warning: filesystem: /var/opt (No such file or directory)
warning: filesystem: /var/spool/mail (No such file or directory)

Last edited by snap.ve (2020-06-04 15:31:43)

Offline

#12 2020-06-04 16:39:27

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,534
Website

Re: [SOLVED] Failed to copy files to /etc/motd

snap.ve wrote:

How can i exclude /usr/share/factory/etc/motd with find util?

The best way to exclude it is to not run any of those commands at all.  None of those are for system cleaning, they are for system breaking.

Specifically, the first two should not be done at all.  You could check the list of empty files and directories for any that are not owned by packages, but really this would just be better done for looking for any unowned files and considering pruning those.

As for the third, you should merge pacnew files, not just delete them.

Last edited by Trilby (2020-06-04 16:40:45)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB