/etc/apt/trusted.gpg are ignored as the file is not readable by user

Bonjour,
je viens d’intaller debian Stretch dans une machine virtuelle pour découvrir avant de migrer.
Au 1er boot j’ai voulu activer les depots contrib et non-free via synaptique mais j’ai obtenue l’erreur donnée dans le titre au moment de recharger la liste de paquet.
J’ai uniquement tenté ceci:
# apt install --reinstall debian-archive-keyring
mais sans resultat, la commande # apt update continue de renvoyer:
root@IdeaPad:/# apt update Ign:1 http://ftp.fr.debian.org/debian stretch InRelease Hit:2 http://ftp.fr.debian.org/debian stretch-updates InRelease Hit:3 http://security.debian.org/debian-security stretch/updates InRelease Hit:4 http://ftp.fr.debian.org/debian stretch Release Reading package lists... Done Building dependency tree Reading state information... Done All packages are up to date. W: http://ftp.fr.debian.org/debian/dists/stretch-updates/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg are ignored as the file is not readable by user '_apt' executing apt-key. W: http://security.debian.org/debian-security/dists/stretch/updates/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg are ignored as the file is not readable by user '_apt' executing apt-key. W: http://ftp.fr.debian.org/debian/dists/stretch/Release.gpg: The key(s) in the keyring /etc/apt/trusted.gpg are ignored as the file is not readable by user '_apt' executing apt-key.

Comment puis-je solutionner ceci, s’il vous plait.
Merci.

fait un

apt-key update

et après ton

apt-get update

Bonjour et merci pour ces conseils.
a l’execution j’obtiens:

root@IdeaPad:/# apt-key update
Warning: 'apt-key update' is deprecated and should not be used anymore!
Note: In your distribution this command is a no-op and can therefore be removed safely.

apt-get update continue de renvoyer la meme erreur

que dit

ls -alrt /etc/apt/trusted.gpg

Exemple

ls -alrt /etc/apt/trusted.gpg
-rw-r--r-- 1 root root 15989 juil. 25 20:41 /etc/apt/trusted.gpg

la commande suivante est elle ok?

apt-key list

# ls -alrt /etc/apt/trusted.gpg
-rw------- 1 root root 32 Jul 28 12:17 /etc/apt/trusted.gpg

ensuite j’ai:

# apt-key list
/etc/apt/trusted.gpg.d/debian-archive-jessie-automatic.gpg
----------------------------------------------------------
pub   rsa4096 2014-11-21 [SC] [expires: 2022-11-19]
      126C 0D24 BD8A 2942 CC7D  F8AC 7638 D044 2B90 D010
uid           [ unknown] Debian Archive Automatic Signing Key (8/jessie) <ftpmaster@debian.org>

/etc/apt/trusted.gpg.d/debian-archive-jessie-security-automatic.gpg
-------------------------------------------------------------------
pub   rsa4096 2014-11-21 [SC] [expires: 2022-11-19]
      D211 6914 1CEC D440 F2EB  8DDA 9D6D 8F6B C857 C906
uid           [ unknown] Debian Security Archive Automatic Signing Key (8/jessie) <ftpmaster@debian.org>

/etc/apt/trusted.gpg.d/debian-archive-jessie-stable.gpg
-------------------------------------------------------
pub   rsa4096 2013-08-17 [SC] [expires: 2021-08-15]
      75DD C3C4 A499 F1A1 8CB5  F3C8 CBF8 D6FD 518E 17E1
uid           [ unknown] Jessie Stable Release Key <debian-release@lists.debian.org>

/etc/apt/trusted.gpg.d/debian-archive-stretch-automatic.gpg
-----------------------------------------------------------
pub   rsa4096 2017-05-22 [SC] [expires: 2025-05-20]
      E1CF 20DD FFE4 B89E 8026  58F1 E0B1 1894 F66A EC98
uid           [ unknown] Debian Archive Automatic Signing Key (9/stretch) <ftpmaster@debian.org>
sub   rsa4096 2017-05-22 [S] [expires: 2025-05-20]

/etc/apt/trusted.gpg.d/debian-archive-stretch-security-automatic.gpg
--------------------------------------------------------------------
pub   rsa4096 2017-05-22 [SC] [expires: 2025-05-20]
      6ED6 F5CB 5FA6 FB2F 460A  E88E EDA0 D238 8AE2 2BA9
uid           [ unknown] Debian Security Archive Automatic Signing Key (9/stretch) <ftpmaster@debian.org>
sub   rsa4096 2017-05-22 [S] [expires: 2025-05-20]

/etc/apt/trusted.gpg.d/debian-archive-stretch-stable.gpg
--------------------------------------------------------
pub   rsa4096 2017-05-20 [SC] [expires: 2025-05-18]
      067E 3C45 6BAE 240A CEE8  8F6F EF0F 382A 1A7B 6500
uid           [ unknown] Debian Stable Release Key (9/stretch) <debian-release@lists.debian.org>

/etc/apt/trusted.gpg.d/debian-archive-wheezy-automatic.gpg
----------------------------------------------------------
pub   rsa4096 2012-04-27 [SC] [expires: 2020-04-25]
      A1BD 8E9D 78F7 FE5C 3E65  D8AF 8B48 AD62 4692 5553
uid           [ unknown] Debian Archive Automatic Signing Key (7.0/wheezy) <ftpmaster@debian.org>

/etc/apt/trusted.gpg.d/debian-archive-wheezy-stable.gpg
-------------------------------------------------------
pub   rsa4096 2012-05-08 [SC] [expires: 2019-05-07]
      ED6D 6527 1AAC F0FF 15D1  2303 6FB2 A1C2 65FF B764
uid           [ unknown] Wheezy Stable Release Key <debian-release@lists.debian.org>

root@IdeaPad:/#

curieux que tu aies restreint les droits sur le fichier à l’utilisateur root uniquement, donc c’est normal que les autres utilisateur ne puissent pas y accéder

essai

sudo chmod 644 /etc/apt/trusted.gpg

je n’ai rien restreint par moi meme, ceci est l’etat apres installation.

root@IdeaPad:/# chmod 644 /etc/apt/trusted.gpg
root@IdeaPad:/# apt-get update
Ign:1 http://ftp.fr.debian.org/debian stretch InRelease
Hit:2 http://ftp.fr.debian.org/debian stretch-updates InRelease
Hit:3 http://ftp.fr.debian.org/debian stretch Release                          
Err:2 http://ftp.fr.debian.org/debian stretch-updates InRelease                
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B48AD6246925553 NO_PUBKEY 7638D0442B90D010
Hit:4 http://security.debian.org/debian-security stretch/updates InRelease
Err:5 http://ftp.fr.debian.org/debian stretch Release.gpg
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B48AD6246925553 NO_PUBKEY 7638D0442B90D010 NO_PUBKEY EF0F382A1A7B6500
Err:4 http://security.debian.org/debian-security stretch/updates InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9D6D8F6BC857C906 NO_PUBKEY 8B48AD6246925553
Reading package lists... Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://ftp.fr.debian.org/debian stretch-updates InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B48AD6246925553 NO_PUBKEY 7638D0442B90D010
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://ftp.fr.debian.org/debian stretch Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B48AD6246925553 NO_PUBKEY 7638D0442B90D010 NO_PUBKEY EF0F382A1A7B6500
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://security.debian.org/debian-security stretch/updates InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9D6D8F6BC857C906 NO_PUBKEY 8B48AD6246925553
W: Failed to fetch http://security.debian.org/debian-security/dists/stretch/updates/InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9D6D8F6BC857C906 NO_PUBKEY 8B48AD6246925553
W: Failed to fetch http://ftp.fr.debian.org/debian/dists/stretch-updates/InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B48AD6246925553 NO_PUBKEY 7638D0442B90D010
W: Failed to fetch http://ftp.fr.debian.org/debian/dists/stretch/Release.gpg  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B48AD6246925553 NO_PUBKEY 7638D0442B90D010 NO_PUBKEY EF0F382A1A7B6500
W: Some index files failed to download. They have been ignored, or old ones used instead.
root@IdeaPad:/#

faut mettre a jour les clés erronées sur ce modèle http://www.commentcamarche.net/faq/4445-debian-apt-get-no-pubkey-gpg-error

gpg --keyserver pgpkeys.mit.edu --recv-key 7638D0442B90D010
gpg -a --export 7638D0442B90D010 | sudo apt-key add -

je comprends pas pourquoi ces problemes sur une install fraiche.

root@IdeaPad:/# gpg --keyserver pgpkeys.mit.edu --recv-key 7638D0442B90D010
gpg: failed to start the dirmngr ‘/usr/bin/dirmngr’: No such file or directory
gpg: connecting dirmngr at ‘/root/.gnupg/S.dirmngr’ failed: No such file or directory
gpg: keyserver receive failed: No dirmngr
root@IdeaPad:/#

Ca fonctionne tres bien sur d’autres machines virtuelle donc
je vais laisser tomber pour le moment, installer strech en dur et je re si problemes similaire.
Merci de ton aide Grandtoubab

j’ai la même chose , plus exactement
-rw-r–r-- 1 root root 9045 avril 8 15:54 /etc/apt/trusted.gpg

mais pas de problème d’update
le problème vient surement d’ailleurs

hello,
je n’ai eu ce soucis qu’avec l’iso netinstall qui arrive une fois sur deux environ.
avec l’iso live je n’ai pas eu ce probleme.