Le problème
Les serveurs CentOS/RHEL/OEL 6 configurés pour utiliser le serveur yum local pour les mises à jour reçoivent les erreurs suivantes au moment de la mise à jour de yum.
Downloading Packages: (1/5): kernel-2.6.32-754.12.1.el6.x86_64.rpm | 32 MB 00:01 (2/5): kernel-headers-2.6.32-754.12.1.el6.x86_64.rpm | 4.6 MB 00:00 (3/5): kernel-uek-4.1.12-124.26.10.el6uek.x86_64.rpm | 42 MB 00:00 (4/5): kernel-uek-firmware-4.1.12-124.26.10.el6uek.noarch.rpm | 2.5 MB 00:00 http://localyum/yum/OracleLinux/OL6/latest/x86_64/getPackage/oraclelinux-release-el6-1.0-6.el6.noarch.rpm: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 403 Forbidden" Trying other mirror. Error Downloading Packages: oraclelinux-release-el6-1.0-6.el6.noarch: failure: getPackage/oraclelinux-release-el6-1.0-6.el6.noarch.rpm from el6_latest: [Errno 256] No more mirrors to try.
La solution
Vérifiez à l'intérieur de la structure de répertoires du serveur yum signale des autorisations non valides pour quelques packages.
-rw-r--r-- 1 root root 128676 Mar 12 00:49 pcp-libs-devel-3.10.9-9.0.1.el6.x86_64.rpm -rw-r--r-- 1 root root 104328 Mar 12 00:49 pcp-webapi-3.10.9-9.0.1.el6.x86_64.rpm -rw-r----- 1 root root 11100 Mar 19 22:30 yum-config-ociSGW-1.0-6.el6.noarch.rpm < -- Other User has no read access -rw-r----- 1 root root 17932 Mar 19 22:30 oraclelinux-release-el6-1.0-6.el6.noarch.rpm -rw-r--r-- 1 root root 934052 Mar 20 02:21 suitesparse-static-3.4.0-9.0.1.el6.x86_64.rpm -rw-r--r-- 1 root root 148644 Mar 20 02:21 suitesparse-devel-3.4.0-9.0.1.el6.i686.rpm
Accordez l'autorisation de lecture aux autres utilisateurs dans le dernier répertoire de canaux CentOS/RHEL/OL 6 sur le serveur yum local.
# cd /var/www/html/yum/OracleLinux/OL6/latest/x86_64/ # chmod -R o+r getpackages/
Diagnostic
wget avec le mode de débogage révélera l'autorisation ou d'autres problèmes d'accès.
# wget -d http://localyum/yum/OracleLinux/OL6/latest/x86_64/getPackage/oraclelinux-release-el6-1.0-6.el6.noarch.rpm DEBUG output created by Wget 1.12 on linux-gnu. --2019-05-06 11:02:17-- http://localyum/yum/OracleLinux/OL6/latest/x86_64/getPackage/oraclelinux-release-el6-1.0-6.el6.noarch.rpm Resolving localyum... x.x.x.x Caching localyum => x.x.x.x Connecting to localyum|x.x.x.x|:80... connected. Created socket 3. Releasing 0x00000000022931d0 (new refcount 1). ---request begin--- GET /yum/OracleLinux/OL6/latest/x86_64/getPackage/oraclelinux-release-el6-1.0-6.el6.noarch.rpm HTTP/1.0 User-Agent: Wget/1.12 (linux-gnu) Accept: */* Host: aeadsvap142-adp Connection: Keep-Alive ---request end--- HTTP request sent, awaiting response... ---response begin--- HTTP/1.1 403 Forbidden Date: Mon, 06 May 2019 07:02:25 GMT Server: Apache/2.4.6 () Content-Length: 291 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: text/html; charset=iso-8859-1 ---response end--- 403 Forbidden Registered socket 3 for persistent reuse. Skipping 291 bytes of body: [ <html><head> <title>403 Forbidden</title> </head><body> <h1>Forbidden</h1> <p>You don't have permission to access /yum/OracleLinux/OL6/latest/x86_64/getPackage/oraclelinux-release-el6-1.0-6.el6.noarch.rpm on this server.</p> </body></html> ] done. 2019-05-06 11:02:17 ERROR 403: Forbidden.