Hello
I have this message each time i use: pamac upgrade -a
pamac upgrade -a 6s
Vorbereitung…
Synchronisiere Paketdatenbanken…
Aktualisierung von AUR…
cp: Zugriff auf ‘/var/lib/pacman/sync/download-ASOzbC’ nicht möglich: Keine Berechtigung
cp: Zugriff auf ‘/var/lib/pacman/sync/download-axt88o’ nicht möglich: Keine Berechtigung
What can I do to get access to these files? I always get this message each time I upgrade..
Thank You Very Much
Those are temporary download folders, usually empty. The problem is those are created from the new download user “alpm” after one of the last update. Which confuses other tools like yay or pamac, because those start to run with your user and only ask for root if needed… obviously they do not detect it is needed here.
I am still thinking of a smart solution myself which allows me to use yay -Scc for example.
In the meantime you can ignore it if it does not stop you workflow, or periodically rm those folders manually with sudo, or revert to the old behavior of alpm to download as root. To do this, the setting is in pacman.conf
It is, indeed. The problem is known about upstream.
pacman was updated with the Stable Update of 2025.12.23. That’s when the problem began. There was another update to pacman in the Stable Update of 2026.02.01.
One can revert to the old behavior in pacman.conf, but since this change was done to enhance security, and is a known bug, i would just ignore those or delete them with sudo until a fix arrives.
Until December 2025 there was no need to remove these directories “by hand”. But perhaps the issue is gone just now, but i did not see it with this stable update and i have to wait for next update ?
As far as I know, these directories are created but then not removed automatically
when pamac is used as root (sudo pamac …)
which one should never do.
It is not really an issue when pamac is used as intended.
Nope, this is not (the only?) case. This is actually the new version of pacman using a new user ALPM owning the temporary download dirs instead of root to tighten security.
I think i saw somewhere an open issue upstream about polishing this new function in the future/bugfixing so that the temp folders are removed. Patience. Is not that critical anyway, the only thing it breaks is yay -Scc for example.
Aha… I must admit to having done it a couple of times - but now…
➤ sudo pamac upgrade
[sudo] password for ben:
Warning: Do not use 'pamac' with 'root' privileges. It can cause permission issues.
Are you sure you want to continue? (y/n):
I can’t say it happened recently, but I’m terrible for confusing similar words with similar spelling - pacman and pamac are a little too easy to switch.
So, extra protection…
➤ which pamac
/usr/local/bin/pamac
➤ z /usr/local/bin
/usr/local/bin
➤ kate pamac
Then paste this:
#!/bin/bash
if [[ $(ps -o comm= $PPID) == "sudo" ]]; then
echo "Warning: Do not use 'pamac' with 'root' privileges. It can cause permission issues."
read -p "Are you sure you want to continue? (y/n): " choice
if [[ $choice != "y" ]]; then
echo "Exiting..."
exit 1
else
echo "Continuing..."
fi
fi
/usr/bin/pamac "$@"
Then:
chmod +x /usr/local/bin/pamac
Then this new ‘pamac’ becomes your new pamac with a reminder…