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

The Geek Diary

CONCEPTS | BASICS | HOWTO

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • Linux Services
    • VCS
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Interview Questions
  • 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. Understanding the job control commands in Linux – bg, fg and CTRL+Z
  2. CentOS / RHEL 7 : How to set udev rules for ASM on multipath disks
  3. CentOS / RHEL : How to get the date and time of executed command in the history command output
  4. How to Create a New /boot Partition in CentOS / RHEL
  5. How to Connect Remote Host Using the ssh Command
  6. How to enable SFTP Logging without chroot in CentOS/RHEL
  7. Linux OS Service ‘sendmail’
  8. Linux OS Service ‘NetworkManagerDispatcher’
  9. System Log File /var/log/messages Is Getting Deleted or Trimmed Automatically (CentOS/RHEL)
  10. How to Use Udev Rules to Create oracleasm Disks in CentOS/RHEL 8

You May Also Like

Primary Sidebar

Recent Posts

  • CentOS/RHEL 8: “ACPI MEMORY OR I/O RESET_REG” Server Hung after reboot
  • How to Create a Physical Standby Database by Using SQL and RMAN Commands
  • Basics of client connectivity in Oracle Data Guard configuration
  • ORA-354 ORA-353 and ORA-312: Possible corruption in Online Redo Log File Members in a Redo Log Group
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary