/var/lib/pacman/sync/refresh_timestamp could not be read

In the last couple of days, the filesystem package was updated twice, but there’s a bug in it. When executing…

pamac update

… just now in order to update the x.org packages, I got an error message that /var/lib/pacman/sync/refresh_timestamp could not be read. Its permissions were set to -rw------ (i.e. 600). After changing them to -rw-r--r-- (i.e. 644) pamac did not complain anymore.

1 Like

That’s not related to any package. I don’t even have that file and it’s not owned by any package. Somehow yours was corrupted.

It’s an empty file, so there’s very little that can be corrupted about it. It only serves as a timestamp somehow, and clearly pamac looks for it and attempts to read it, or else it wouldn’t be complaining that it doesn’t have read access on the file.

Well, either pacman-mirrors or the pamac-mirrorlist.service must create that as I don’t use either.

Hmm… I have recently disabled pamac-mirrorlist.service because it provided me with slow mirrors, requiring me to periodically refresh the mirror list myself. So that might be where it comes from. :thinking:

Still, if pamac-mirrorlist.service creates that file, then obviously it is doing so with the wrong permissions. The service is root-owned and should therefore respect root’s umask ─ which is 022 ─ upon the creation of files.

Disabling it isn’t enough, one must disable and mask the pamac-mirrorlist.timer as well.

I know, and I’ve done that.