You are not logged in.

#1 2024-10-31 20:32:06

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,150

[solved] mkarchroot: permissions error for core.db.part

I know I must be doing something stupid because this is really pretty basic, but I just cannot see what.

I was trying to follow https://wiki.archlinux.org/title/Develo … ean_chroot, but I get a permissions error when I try to setup the chroot:

$ mkarchroot $CHROOT/root base-devel
[sudo] password for <username>:
==> Creating install root at /home/ <username>/chroot/root
==> Installing packages to /home/ <username>/chroot/root
:: Synchronizing package databases...
error: could not open file /home/ <username>/chroot/root/var/lib/pacman/sync/download-urrJCv/core.db.part: Permission denied
error: failed to setup a download payload for core.db
error: failed to synchronize all databases (failed to retrieve some files)
==> ERROR: Failed to install packages to new root
==> ERROR: Failed to install all packages

The instructions do not suggest I should be running mkarchroot with root privileges, so I'm reluctant to try that without understanding whether that is, in fact, what I should be doing.

sudo is setup non-standardly on my laptop, so privileges are escalated only for a single command. This sometimes means I get repeated requests for my password, but it has never caused something to fail.

$ umask
0022
$ ls -lR ~/chroot/ 
ls: cannot open directory '/home/<username>/chroot/root/etc/pacman.d/gnupg/crls.d': Permission denied
ls: cannot open directory '/home/<username>/chroot/root/etc/pacman.d/gnupg/openpgp-revocs.d': Permission denied
ls: cannot open directory '/home/<username>/chroot/root/etc/pacman.d/gnupg/private-keys-v1.d': Permission denied
/home/<username>/chroot/:
total 4
drwxr-xr-x 9 root root 4096 Hyd  31 19:36 root/
-rw-r--r-- 1 root root    0 Hyd  31 19:36 root.lock

/home/<username>/chroot/root:
total 28
drwxr-xr-x 2 root root 4096 Hyd  31 19:36 dev/
drwxr-xr-x 3 root root 4096 Hyd  31 19:36 etc/
dr-xr-xr-x 2 root root 4096 Hyd  31 19:36 proc/
drwxr-xr-x 2 root root 4096 Hyd  31 19:36 run/
dr-xr-xr-x 2 root root 4096 Hyd  31 19:36 sys/
drwxrwxrwt 2 root root 4096 Hyd  31 19:36 tmp/
drwxr-xr-x 5 root root 4096 Hyd  31 19:36 var/

/home/<username>/chroot/root/dev:
total 0

/home/<username>/chroot/root/etc:
total 4
drwxr-xr-x 3 root root 4096 Hyd  31 19:36 pacman.d/

/home/<username>/chroot/root/etc/pacman.d:
total 4
drwxr-xr-x 5 root root 4096 Hyd  29 05:15 gnupg/

/home/<username>/chroot/root/etc/pacman.d/gnupg:
total 4232
srw------- 1 root root       0 Hyd  11 08:43 S.dirmngr=
srw------- 1 root root       0 Hyd  11 08:43 S.gpg-agent=
srw------- 1 root root       0 Hyd  11 08:43 S.gpg-agent.browser=
srw------- 1 root root       0 Hyd  11 08:43 S.gpg-agent.extra=
srw------- 1 root root       0 Hyd  11 08:43 S.gpg-agent.ssh=
srw------- 1 root root       0 Hyd  11 08:43 S.keyboxd=
srwx------ 1 root root       0 Hyd  16 17:51 S.scdaemon=
drwx------ 2 root root    4096 Hyd  18  2017 crls.d/
-rw-r--r-- 1 root root     116 Rha  20  2022 gpg.conf
drwx------ 2 root root    4096 Med  30  2017 openpgp-revocs.d/
drwx------ 2 root root    4096 Med  30  2017 private-keys-v1.d/
-rw-r--r-- 1 root root 2120310 Hyd  29 05:15 pubring.gpg
-rw-r--r-- 1 root root 2120310 Hyd  29 05:15 pubring.gpg~
-rw------- 1 root root       0 Med  30  2017 secring.gpg
-rw-r--r-- 1 root root   49152 Gor  10 10:38 tofu.db
-rw-r--r-- 1 root root   23400 Hyd  29 05:15 trustdb.gpg

/home/<username>/chroot/root/proc:
total 0

/home/<username>/chroot/root/run:
total 0

/home/<username>/chroot/root/sys:
total 0

/home/<username>/chroot/root/tmp:
total 0

/home/<username>/chroot/root/var:
total 12
drwxr-xr-x 3 root root 4096 Hyd  31 19:36 cache/
drwxr-xr-x 3 root root 4096 Hyd  31 19:36 lib/
drwxr-xr-x 2 root root 4096 Hyd  31 19:36 log/

/home/<username>/chroot/root/var/cache:
total 4
drwxr-xr-x 3 root root 4096 Hyd  31 19:36 pacman/

/home/<username>/chroot/root/var/cache/pacman:
total 4
drwxr-xr-x 2 root root 4096 Hyd  31 19:36 pkg/

/home/<username>/chroot/root/var/cache/pacman/pkg:
total 0

/home/<username>/chroot/root/var/lib:
total 4
drwxr-xr-x 4 root root 4096 Hyd  31 19:36 pacman/

/home/<username>/chroot/root/var/lib/pacman:
total 8
drwxr-xr-x 2 root root 4096 Hyd  31 19:36 local/
drwxr-xr-x 2 root root 4096 Hyd  31 19:36 sync/

/home/<username>/chroot/root/var/lib/pacman/local:
total 4
-rw-r--r-- 1 root root 2 Hyd  31 19:36 ALPM_DB_VERSION

/home/<username>/chroot/root/var/lib/pacman/sync:
total 0

/home/<username>/chroot/root/var/log:
total 4
-rw-r--r-- 1 root root 232 Hyd  31 19:36 pacman.log

What am I doing wrong?

Last edited by cfr (2024-10-31 23:51:17)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#2 2024-10-31 20:44:21

seth
Member
Registered: 2012-09-03
Posts: 59,120

Re: [solved] mkarchroot: permissions error for core.db.part

https://archlinux.org/news/manual-inter … -required/
https://bbs.archlinux.org/viewtopic.php?id=299394

You're $HOME is most likely 700
=> Move or bind-mount the repo into a public path, eg. /srv

Offline

#3 2024-10-31 23:50:50

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,150

Re: [solved] mkarchroot: permissions error for core.db.part

seth wrote:

https://archlinux.org/news/manual-inter … -required/
https://bbs.archlinux.org/viewtopic.php?id=299394

You're $HOME is most likely 700
=> Move or bind-mount the repo into a public path, eg. /srv

Thanks! I read the news, but I did not realise it was connected. That is, I didn't realise this counted as a 'repo' and, also, the guidance seemed aimed at existing setups.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

Board footer

Powered by FluxBB