Warning: multilib.files: lock file missing /var/tmp/pamac/dbs/db.lck

Actually everything works well with Pacman and Pamac (like install new packages/update packages), but when I run

sudo pacman-mirrors -f 5 && pamac update --force-refresh -a

I get a warning

Warning: multilib.files: lock file missing /var/tmp/pamac/dbs/db.lck

Why and how to solve this warning?

Try again ? :man_shrugging:
(It is only a warning, no error)
( and check permissions of /var, /var/tmp, /var/tmp/pamac , /var/tmp/pamac/dbs )

try:
pacman -Syyu

Thanks for your reply, but repeating

sudo pacman-mirrors -f 5 && pamac update --force-refresh -a

comes always up with the same warning!

Permissions of

/var > owner read and write by root, group/others read only
/var/tmp  > all read and write by root
/var/tmp/pamac > all read and write by user
/var/tmp/pamac/dbs > all read and write by root
sudo pacman -Syyu
:: Synchronizing package databases...
 core                               145,1 KiB   146 KiB/s 00:01 [-----------------------------------] 100%
 extra                                8,6 MiB   943 KiB/s 00:09 [-----------------------------------] 100%
 multilib                           143,7 KiB   145 KiB/s 00:01 [-----------------------------------] 100%
:: Starting full system upgrade...
 there is nothing to do

Any idea why this

Warning: multilib.files: lock file missing /var/tmp/pamac/dbs/db.lck

comes up?

Please compare:

drwxr-xr-x   1 root    root     128 19. Jul 08:45 var
drwxrwxrwt 1 root root  1212 20. Jul 14:43 tmp
drwxrwxrwx 1 andreas andreas 52 17. Jul 19:33 pamac
drwxrwxrwx 1 andreas andreas      18 20. Jul 14:26 dbs

Did you (accidentally) run pamac as root ? :innocent:
:footprints:

Thanks for your reply.
What is the terminal command to get it displayed in your way?

Maybe accidentally, cause as you pointed out my permission on /var/tmp/pamac/dbs is wrong and I changed it from root to user (via Nemo as admin),
but when I run

pamac update --force-refresh -a

not only the old warning is back also my change is reverted to root!
In other words, the change I made is not permanent!

How do I solve that?
Thanks in advance.

You could try

ls -ld /var{,/tmp{,/pamac{,/dbs{,/sync}}}}

along with

ls -lh /var/tmp/pamac/dbs/sync

Just for completeness, I wouldn’t mind seeing the results of the commands 3 times:

  1. At the start, to establish a baseline
  2. After changing directory and/or file ownership and/or permissions (via Nemo or another method)
  3. After running pamac update --force-refresh -a

I very much appreciate your reply.

ls -ld /var{,/tmp{,/pamac{,/dbs{,/sync}}}}
drwxr-xr-x 12 root  root  4096 21. Jul  04:31 /var
drwxrwxrwt 10 root  root  4096 21. Jul  06:38 /var/tmp
drwxrwxrwx  4 user  user 4096 21. Jul  06:39 /var/tmp/pamac
drwxrwxrwx  3 root  root  4096 21. Jul  06:40 /var/tmp/pamac/dbs
drwxrwxrwx  2 root  root  4096 21. Jul  06:40 /var/tmp/pamac/dbs/sync
ls -lh /var/tmp/pamac/dbs/sync
total 86M
-rw-rw-rw- 1 root  root  1,0K 17. Jul  08:18 community.db
-rw-rw-rw- 1 root  root   34M 29. Jun  23:48 community.files
-rw-rw-rw- 1 root  root  146K 19. Jul  08:18 core.db
-rw-r--r-- 1 root  root  2,2M 19. Jul  08:18 core.files
-rw-r--r-- 1 user  user    0  8. Mai  01:28 core.files.part
-rw-rw-rw- 1 root  root  8,7M 20. Jul  16:36 extra.db
-rw-r--r-- 1 root  root   41M 20. Jul  16:36 extra.files
-rw-rw-rw- 1 root  root  144K 19. Jul  08:19 multilib.db
-rw-r--r-- 1 root  root  217K 19. Jul  08:19 multilib.files
-rw-rw-rw- 1 root  root     0  7. Jul  22:34 refresh_timestamp

Ok, via

sudo chown user:user /var/tmp/pamac/dbs
ls -ld /var{,/tmp{,/pamac{,/dbs{,/sync}}}}
drwxr-xr-x 12 root  root  4096 21. Jul  04:31 /var
drwxrwxrwt 10 root  root  4096 21. Jul  06:38 /var/tmp
drwxrwxrwx  4 user  user 4096 21. Jul  06:39 /var/tmp/pamac
drwxrwxrwx  3 user  user 4096 21. Jul  06:40 /var/tmp/pamac/dbs
drwxrwxrwx  2 root  root  4096 21. Jul  06:40 /var/tmp/pamac/dbs/sync
ls -lh /var/tmp/pamac/dbs/sync
total 86M
-rw-rw-rw- 1 root  root  1,0K 17. Jul  08:18 community.db
-rw-rw-rw- 1 root  root   34M 29. Jun  23:48 community.files
-rw-rw-rw- 1 root  root  146K 19. Jul  08:18 core.db
-rw-r--r-- 1 root  root  2,2M 19. Jul  08:18 core.files
-rw-r--r-- 1 user  user    0  8. Mai  01:28 core.files.part
-rw-rw-rw- 1 root  root  8,7M 20. Jul  16:36 extra.db
-rw-r--r-- 1 root  root   41M 20. Jul  16:36 extra.files
-rw-rw-rw- 1 root  root  144K 19. Jul  08:19 multilib.db
-rw-r--r-- 1 root  root  217K 19. Jul  08:19 multilib.files
-rw-rw-rw- 1 root  root     0  7. Jul  22:34 refresh_timestamp
ls -ld /var{,/tmp{,/pamac{,/dbs{,/sync}}}}
drwxr-xr-x 12 root  root  4096 21. Jul  04:31 /var
drwxrwxrwt 10 root  root  4096 21. Jul  06:38 /var/tmp
drwxrwxrwx  4 user  user 4096 21. Jul  06:53 /var/tmp/pamac
drwxrwxrwx  3 root  root  4096 21. Jul  06:54 /var/tmp/pamac/dbs
drwxrwxrwx  2 root  root  4096 21. Jul  06:54 /var/tmp/pamac/dbs/sync
ls -lh /var/tmp/pamac/dbs/sync
total 86M
-rw-rw-rw- 1 root  root  1,0K 17. Jul  08:18 community.db
-rw-rw-rw- 1 root  root   34M 29. Jun  23:48 community.files
-rw-rw-rw- 1 root  root  146K 19. Jul  08:18 core.db
-rw-r--r-- 1 root  root  2,2M 19. Jul  08:18 core.files
-rw-r--r-- 1 user  user    0  8. Mai  01:28 core.files.part
-rw-rw-rw- 1 root  root  8,7M 20. Jul  16:36 extra.db
-rw-r--r-- 1 root  root   41M 20. Jul  16:36 extra.files
-rw-rw-rw- 1 root  root  144K 19. Jul  08:19 multilib.db
-rw-r--r-- 1 root  root  217K 19. Jul  08:19 multilib.files
-rw-rw-rw- 1 root  root     0 21. Jul  06:53 refresh_timestamp

Thanks for your time looking into it.

Edit 1: I’ve read all the forums posts on this issue and tried

sudo rm -rf /var/tmp/pamac*

followed by

pamac update --force-refresh -a

without success! The old warning is back also my ownership change

sudo chown user:user /var/tmp/pamac/dbs

is reverted to root again!
Why?

Edit 2:
When I run

sudo rm -rf /var/tmp/pamac*

followed by

sudo pacman-mirrors -f 5 &&  sudo pacman -Syyu

all ownership/permissions look good

ls -ld /var{,/tmp{,/pamac{,/dbs{,/sync}}}}
drwxr-xr-x 12 root  root  4096 21. Jul 20:42 /var
drwxrwxrwt 10 root  root  4096 21. Jul 21:46 /var/tmp
drwxrwxrwx  3 user  user 4096 21. Jul 20:42 /var/tmp/pamac
drwxrwxrwx  3 user  user 4096 21. Jul 21:57 /var/tmp/pamac/dbs
drwxrwxrwx  2 user  user 4096 21. Jul 21:55 /var/tmp/pamac/dbs/sync

but as soon I run

pamac update --force-refresh -a

the ownership is reverted again

ls -ld /var{,/tmp{,/pamac{,/dbs{,/sync}}}}
drwxr-xr-x 12 root  root  4096 21. Jul 20:42 /var
drwxrwxrwt 10 root  root  4096 21. Jul 21:46 /var/tmp
drwxrwxrwx  3 user  user 4096 21. Jul 21:59 /var/tmp/pamac
drwxrwxrwx  3 root  root  4096 21. Jul 22:00 /var/tmp/pamac/dbs
drwxrwxrwx  2 root  root  4096 21. Jul 22:00 /var/tmp/pamac/dbs/sync

back to root !! (and of course the old warning is back)
WTF and why pamac does that and how to solve it?

Edit 3:
When I run

sudo rm -rf /var/tmp/pamac*

and open the Pamac GUI looking for updates, all all ownership/permissions are looking good,
also when I just run (from terminal)

pamac update

all ownership/permissions are ok!

As soon I choose update database from the menu inside the Pamac GUI the ownership is reverted to root again!
So it is caused by update database (inside the GUI) as well as by –force-refresh -a !!

I can’t narrow it down more (with my limited Linux knowledge), but hope it helps to find the reason for an more experienced user or team member.
Thank for taking your time.

There is nothing to solve here. Look at the permissions. Everyone can access the file, not only root. It hast 777 so u+rwx,g+rwx,o+rwx.

Thanks for your time looking into it.

  1. OK, but why that
Warning: multilib.files: lock file missing /var/tmp/pamac/dbs/db.lck

appears by

pamac update --force-refresh -a

Why the db.lck file is missing?

  1. Why does
pamac update --force-refresh -a

change the ownership of

/var/tmp/pamac/dbs
and
/var/tmp/pamac/dbs/sync

to root?

ls -ld /var{,/tmp{,/pamac{,/dbs{,/sync}}}}
drwxr-xr-x 12 root  root  4096 21. Jul 20:42 /var
drwxrwxrwt 10 root  root  4096 21. Jul 21:46 /var/tmp
drwxrwxrwx  3 user  user 4096 21. Jul 21:59 /var/tmp/pamac
drwxrwxrwx  3 root  root  4096 21. Jul 22:00 /var/tmp/pamac/dbs
drwxrwxrwx  2 root  root  4096 21. Jul 22:00 /var/tmp/pamac/dbs/sync

ls -lh /var/tmp/pamac/dbs/sync
total 52M
-rw-rw-rw- 1 root  root  146K 19. Jul 08:18 core.db
-rw-r--r-- 1 root  root  2,2M 19. Jul 08:18 core.files
-rw-rw-rw- 1 root  root  8,7M 22. Jul 19:03 extra.db
-rw-r--r-- 1 root  root   41M 22. Jul 19:03 extra.files
-rw-rw-rw- 1 root  root  144K 19. Jul 08:19 multilib.db
-rw-r--r-- 1 root  root  217K 19. Jul 08:19 multilib.files
-rw-rw-rw- 1 user  user    0 23. Jul 18:13 refresh_timestamp

which is permanent till I remove the folders by

sudo rm -rf /var/tmp/pamac*
  1. Why does
pamac update

only, whithout –force-refresh -a set

/var/tmp/pamac/dbs
and
/var/tmp/pamac/dbs/sync

ownership as user for those folders (if the folders are deleted before and if not deleted before, the ownership stay at root)?

ls -ld /var{,/tmp{,/pamac{,/dbs{,/sync}}}}
drwxr-xr-x 12 root  root  4096 21. Jul 20:42 /var
drwxrwxrwt 10 root  root  4096 21. Jul 21:46 /var/tmp
drwxrwxrwx  3 user  user 4096 21. Jul 20:42 /var/tmp/pamac
drwxrwxrwx  3 user  user 4096 21. Jul 21:57 /var/tmp/pamac/dbs
drwxrwxrwx  2 user  user 4096 21. Jul 21:55 /var/tmp/pamac/dbs/sync

ls -lh /var/tmp/pamac/dbs/sync
total 52M
-rw-rw-rw- 1 user  user 146K 19. Jul 08:18 core.db
-rw-r--r-- 1 user  user  2,2M 19. Jul 08:18 core.files
-rw-rw-rw- 1 user  user  8,7M 22. Jul 19:03 extra.db
-rw-r--r-- 1 user  user   41M 22. Jul 19:03 extra.files
-rw-rw-rw- 1 user  user  144K 19. Jul 08:19 multilib.db
-rw-r--r-- 1 user  user  217K 19. Jul 08:19 multilib.files
-rw-rw-rw- 1 user  user     0 23. Jul 17:55 refresh_timestamp
  1. Why
pamac update --force-refresh -a
and
pamac update

behave different in setting ownership to those folders? @guinux

All that doesn’t make sense, does it?
Can anyone reproduce my very last question?
I would very much appreciate an explanation on that behavior.

It seems to me ownership changes because it’s supposed to. Since permissions are drwxrwxrwx there’s access for all anyways.

Does running pamac upgrade --force-refresh also give other error messages?

1 Like

No error messages, but the same warning

Warning: multilib.files: lock file missing /var/tmp/pamac/dbs/db.lck

As I can see in your thread

https://forum.manjaro.org/t/pamac-gui-software-center-reset-to-factory-defaults/145023

that warning is mentioned as false positiv (but no one mentioned it in this thread).
Anyway, not a solution, but good to know.