You are not logged in.

#1 2024-10-23 20:14:06

Rec100
Member
Registered: 2022-03-12
Posts: 32

Relocated Pacman cache now permission problems.

I have create a directory to put the pacman cache in, ~/.linux/arch/pacman/pkg/`. Afterwards I've uncommented and edit the respective line in `/etc/pacman.conf` accordingly:

CacheDir    = /home/user/.linux/arch/pacman/pkg/

I've made sure the pkg dir has the corrects rights and group set up:

$ ls -lah ~/.linux/arch/pacman/ && ls -lah /var/cache/pacman/

# ~/.linux/arch/pacman/
drwxr-xr-x 3 user user 4.0K Oct 23 21:23 .
drwxr-xr-x 5 user user 4.0K Oct 14 17:52 ..
drwxr-xr-x 2 root root 208K Oct 23 21:53 pkg

# /var/cache/pacman/
drwxr-xr-x  3 root root 4.0K Oct 23 19:12 .
drwxr-xr-x 12 root root 4.0K Oct 23 20:09 ..
drwxr-xr-x  2 root root 172K Oct 23 21:16 pkg

I've then moved all existing packages (I'm on a fresh install here) to the new location:

sudo mv /var/cache/pacman/pkg/* /home/user/.linux/arch/pacman/pkg/

I now want to install a new package and get the following error:

...
:: Proceed with installation? [Y/n] y
:: Retrieving packages...
error: could not open file /home/user/.linux/arch/pacman/pkg/download-x6n4eN/lychee-0.16.1-1-x86_64.pkg.tar.zst.part: Permission denied
error: failed to setup a download payload for lychee-0.16.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.

Any ideas what's causing this?
On another installation this even worked with the new pkg location being owned by the user and the user group (which I've tried here, too).
Thanks for your help.


Edit
I am looking at this post, but either the solution does not work for me, or something is still wrong.
I've added the following to /etc/fstab:

# Pacman cache and new pacman download user 'alpm'
#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
tmpfs /home/user/.linux/pacman/pkg tmpfs rw,noatime,nodiratime,nodev,noexec,nosuid,nr_inodes=5M,size=4G,uid=alpm,gid=alpm,mode=1700 0 0

Last edited by Rec100 (2024-10-23 20:25:13)

Offline

#2 2024-10-23 21:42:25

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,170

Re: Relocated Pacman cache now permission problems.

Why would you want to do that in the first place? The directory you want needs to be owned and executable by the alpm user -- this is a recent change as of pacman 7.

Offline

#3 2024-10-23 21:48:33

seth
Member
Registered: 2012-09-03
Posts: 58,657

Re: Relocated Pacman cache now permission problems.

… and enteraberable (there're some letters too many in that)
https://bbs.archlinux.org/viewtopic.php?id=299394

Online

#4 2024-10-25 07:48:29

mountaintrek
Member
Registered: 2024-02-01
Posts: 36

Re: Relocated Pacman cache now permission problems.

Check archlinux news on the home page.

There is an article, Manual intervention for pacman 7.0.0 and local repositories required.

Offline

Board footer

Powered by FluxBB