Pamac error "cannot create regular file..."

I just ran pamac update and it threw these errors:

$ pamac update
Preparing...
Synchronizing package databases...
Refreshing extra.db...                                                          
cp: cannot create regular file '/tmp/pamac/dbs/sync/extra.db': Permission denied
cp: preserving times for '/tmp/pamac/dbs/sync/refresh_timestamp': Operation not permitted

It looks like pamac will continue regardless, but I wonder what (has) happened, because this has not occurred before.

Interesting… I think this was caused by first logging user A into a Cinnamon desktop session, logging out with user A, then logging in with user B into a Cinnamon desktop session.

Once I had rebooted and logged in immediately as user B the problem disappeared.

I wonder, is the intention for each user to have their own sync db in /tmp/pamac and not shared. HHhhhmmm… or is there a permission/ownership problem.

I normally use pacman and the sync db is located /var/lib/pacman/sync.

Yep, I think these files were probably locked/owned by User A because that user was logged in first. Apparently they were not released/deleted when User A logged out. /tmp was cleared out after a reboot, so that’s when User B logging in first could properly run pamac without errors.

1 Like

I just had the same happening with

pamac install strace
Preparing...
Synchronizing package databases...
cp: preserving times for '/tmp/pamac/dbs/sync/refresh_timestamp': Operation not permitted
Resolving dependencies...
Checking inter-conflicts...

And you were absolutely right, so I’ve marked your answer as the solution and a bug has been filed for this.

:+1:

2 Likes

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.