You are not logged in.

#1 2024-09-15 13:43:46

jronald
Member
Registered: 2022-05-09
Posts: 157

[SOLVED] Permission denied for pacman

Because yay-bin is out of date and fails when loading a shared library,
and yay is much newer,
I'm going to try yay.
yay depneds on go,
but it failed when installing go as below

$ sudo pacman -S go
resolving dependencies...
looking for conflicting packages...

Packages (1) go-2:1.23.1-1

Total Download Size:    39.76 MiB
Total Installed Size:  223.29 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
error: could not open file /var/cache/pacman/pkg/download-B9zmJq/go-2:1.23.1-1-x86_64.pkg.tar.zst.part: Permission denied
error: failed to setup a download payload for go-2:1.23.1-1-x86_64.pkg.tar.zst
warning: failed to retrieve some files
error: failed to commit transaction (failed to retrieve some files)
Errors occurred, no packages were upgraded.

BTW, it's a general error, i.e. pacman always fails, no matter what to install.
I have archlinux not updated for only several days,
before that everything is ok.

$ ls -l /var/cache/pacman
total 0
drwx-----T 2 root root 40 Sep 15 21:21 pkg

/etc/fstab

tmpfs /var/cache/pacman/pkg tmpfs rw,noatime,nodiratime,nodev,noexec,nosuid,nr_inodes=5M,size=4G,uid=root,gid=root,mode=1700 0 0

What's the problem and how to solve it?

Last edited by jronald (2024-09-16 00:57:24)

Offline

#2 2024-09-15 14:25:34

ivanmlerner
Member
From: São Paulo
Registered: 2016-03-30
Posts: 37

Re: [SOLVED] Permission denied for pacman

I was having a similar problem, but when trying to create a clean chroot. The error messages were the same, but my pacman is working as usual.
What solved it for me is commenting out the new line that was merged from the pacman.conf.pacnew

DownloadUser = alpm

Obviously that is not an ideal solution since it should work with the unprivileged user, but I couldn't find any more information in logs to find a proper way of handling this.

Offline

#3 2024-09-15 14:37:03

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,649

Re: [SOLVED] Permission denied for pacman

Look at the permissions you're mounting with, the problem should be obvious. Pacman no longer downloads as root by default.

Offline

#4 2024-09-15 15:48:33

jronald
Member
Registered: 2022-05-09
Posts: 157

Re: [SOLVED] Permission denied for pacman

Scimmia wrote:

Look at the permissions you're mounting with, the problem should be obvious. Pacman no longer downloads as root by default.

Modified "/etc/fstab" as below, but same error

tmpfs /var/cache/pacman/pkg tmpfs rw,noatime,nodiratime,nodev,noexec,nosuid,nr_inodes=5M,size=4G,uid=my_user_name,gid=my_group_name,mode=1700 0 0

Last edited by jronald (2024-09-15 15:49:12)

Offline

#5 2024-09-15 15:53:23

astralc
Member
Registered: 2022-09-17
Posts: 100

Re: [SOLVED] Permission denied for pacman

it also not downloading with your user, it use special 'alpm' user now

Offline

#6 2024-09-16 00:56:52

jronald
Member
Registered: 2022-05-09
Posts: 157

Re: [SOLVED] Permission denied for pacman

astralc wrote:

it also not downloading with your user, it use special 'alpm' user now

Solved, thanks.

/etc/fstab

tmpfs /var/cache/pacman/pkg tmpfs rw,noatime,nodiratime,nodev,noexec,nosuid,nr_inodes=5M,size=4G,uid=alpm,gid=alpm,mode=1700 0 0

Offline

Board footer

Powered by FluxBB