• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

“The requested URL returned error: 403 Forbidden” – yum update error

by admin

The Problem

CentOS/RHEL/OEL 6 server’s configured to use local yum server for updates are getting following errors at time of yum update.

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.

The Solution

Check inside the directory structure of yum server reports invalid permissions for few 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

Grant read permission for other users inside CentOS/RHEL/OL 6 latest channel directory on local yum server.

# cd /var/www/html/yum/OracleLinux/OL6/latest/x86_64/
# chmod -R o+r getpackages/

Diagnostics

wget with debugging mode will reveal the permission or other access issues.

# 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.

Filed Under: CentOS/RHEL 6, Linux, OEL 6

Some more articles you might also be interested in …

  1. “Logical volume vg/lv contains a filesystem in use” – while removing LVM filesystem
  2. addr2line Command Examples in Linux
  3. “Bad id for repo: My Repo, byte = 2” yum update error
  4. CentOS / RHEL 6 : How to limit memory resources for a specific user using cgroups
  5. How to use the ssh-keygen Command in Linux
  6. xxd command – Expressed in hexadecimal form
  7. Unable to set a GRUB password on a Raspberry Pi 3 system
  8. lrunzip Command Examples in Linux
  9. How to view file size/details from ls command in Unix
  10. tracepath Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • powertop Command Examples in Linux
  • powertop: command not found
  • powerstat: command not found
  • powerstat Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright