ysdragon / Pterodactyl-VPS-Egg

Pterodactyl VPS Egg
46 stars 28 forks source link

Apt update failed: can't read files in trusted.gpg.d folder #23

Open sys-arch opened 2 months ago

sys-arch commented 2 months ago

When you use the apt update command to update, on operating systems like Debian or based on it like Kali, it does not allow you to read the keys that are in /etc/apt/trusted.gpg.d because according to the system it does not have permissions to update. reading.

Even if you set all the permissions (777, although it is insecure) it is not able to read the files. Also, if you try to add the missing keys (NO_PUBKEY ED444FF07D8D0BF6) it still fails.

ON other systems like Ubuntu or CentOS I have not had that problem

W: http://kali.download/kali/dists/kali-rolling/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/debian-archive-bookworm-automatic.asc are ignored as the file is not readable by user '_apt' executing apt-key.
W: http://kali.download/kali/dists/kali-rolling/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/debian-archive-bookworm-security-automatic.asc are ignored as the file is not readable by user '_apt' executing apt-key.
W: http://kali.download/kali/dists/kali-rolling/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/debian-archive-bookworm-stable.asc are ignored as the file is not readable by user '_apt' executing apt-key.
W: http://kali.download/kali/dists/kali-rolling/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/debian-archive-bullseye-automatic.asc are ignored as the file is not readable by user '_apt' executing apt-key.
W: http://kali.download/kali/dists/kali-rolling/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/debian-archive-bullseye-security-automatic.asc are ignored as the file is not readable by user '_apt' executing apt-key.
W: http://kali.download/kali/dists/kali-rolling/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/debian-archive-bullseye-stable.asc are ignored as the file is not readable by user '_apt' executing apt-key.
W: http://kali.download/kali/dists/kali-rolling/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/debian-archive-buster-automatic.asc are ignored as the file is not readable by user '_apt' executing apt-key.
W: http://kali.download/kali/dists/kali-rolling/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/debian-archive-buster-security-automatic.asc are ignored as the file is not readable by user '_apt' executing apt-key.
W: http://kali.download/kali/dists/kali-rolling/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/debian-archive-buster-stable.asc are ignored as the file is not readable by user '_apt' executing apt-key.
W: http://kali.download/kali/dists/kali-rolling/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/kali-archive-keyring.gpg are ignored as the file is not readable by user '_apt' executing apt-key.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://kali.download/kali kali-rolling InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY ED444FF07D8D0BF6
W: Failed to fetch http://kali.download/kali/dists/kali-rolling/InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY ED444FF07D8D0BF6
W: Some index files failed to download. They have been ignored, or old ones used instead
ysdragon commented 2 months ago

What's your node os?

sys-arch commented 2 months ago

What's your node os?

My server use Debian 11

sys-arch commented 2 months ago

That error i published is in the last versions of Debian (12) and Kali

I checked that if i select in VPS Debian 11, apt update works fine

╭────────────────────────────────────────────────────────────────────────────────╮
│                                                                                │
│                             Pterodactyl VPS EGG                                │
│                                                                                │
│                           © 2021 - 2024 ysdragon                               │
│                                                                                │
╰────────────────────────────────────────────────────────────────────────────────╯

root@MyVPS:~#                                                                             
root@MyVPS:~# apt update
Hit:1 http://deb.debian.org/debian bullseye InRelease
Get:2 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]
Get:3 http://deb.debian.org/debian-security bullseye-security InRelease [48.4 kB]
Fetched 92.4 kB in 0s (235 kB/s)    
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
root@MyVPS:~# 
ysdragon commented 2 months ago

Yes, maybe it's a problem from the Debian 12, Kali image. But, you can ignore these GPG keys errors/warnings if you really wish to use them. And if you really wish to test further, you can deploy wings in a node based on CentOS/Fedora or any other distro other than Ubuntu/Debian.

sys-arch commented 2 months ago

Yes, maybe it's a problem from the Debian 12, Kali image. But, you can ignore these GPG keys errors/warnings if you really wish to use them.

I know how to ignore them, but the ideal would be not to do so for safety. Having all the repositories makes sure that I have all the packages I need and that they are the latest version. And so I don't have to complicate my life to get them either.

And if you really wish to test further, you can deploy wings in a node based on CentOS/Fedora or any other distro other than Ubuntu/Debian.

Before, it had CentOS as its operating system. It was a very good choice because of its stability and especially because the development and testing of the CentOS packages was carried out by a professional company and they have a commercial interest in making sure that everything works stably. Furthermore, it was very modest in its consumption of resources. However, RedHat decided to discontinue it and put in the Stream version, which is not suitable for servers due to its low stability.

https://cloud.google.com/compute/docs/eol/centos-eol-guidance

And Fedora is more suitable for desktops than for servers.

ysdragon commented 2 months ago

I know how to ignore them, but the ideal would be not to do so for safety. Having all the repositories makes sure that I have all the packages I need and that they are the latest version. And so I don't have to complicate my life to get them either.

Okay, then you can build your own rootfs images and use/host them. However, these images are from linuxcontainers.org. You can check there for the build logs for every image from https://images.linuxcontainers.org/images/, and https://fra1lxdmirror01.do.letsbuildthe.cloud/ is an official mirror used by install.sh. You can find more information here: https://discuss.linuxcontainers.org/t/image-server-infrastructure/16647.

Edit: maybe it's an issue from proot itself, i will try to fix that soon.