[CentOS] Permission denied when updating CentOS 8 Streams

Mon Feb 22 11:20:06 UTC 2021
Tony Mountifield <tony at softins.co.uk>

In article <8dc3d2af-a7b0-d54f-85b4-fbdbc49b3106 at gmail.com>,
Gordon Messmer <gordon.messmer at gmail.com> wrote:
> On 2/19/21 12:37 AM, Mathieu Baudier wrote:
> >    - Curl error (7): Couldn't connect to server for
> > http://mirrorlist.centos.org/?release=8-stream&arch=x86_64&repo=AppStream&infra=stock
> > [Failed to connect to mirrorlist.centos.org port 80: Permission denied]
> 
> 
> It's unusual to see EPERM on a call to connect()... The man page 
> suggests that this can be caused by a local firewall rule or an SELinux 
> policy.
> 
> https://man7.org/linux/man-pages/man2/connect.2.html
> 
> "yum" and "wget" should be running in an unconfined domain, so SELinux 
> is *probably* not the cause.  I'd take a look at the output of "iptables 
> -L OUTPUT" first.  I've tried creating local firewall rules that I'd 
> expect to result in EPERM, but they do not, so I'm not sure what such a 
> rule looks like.

Of course, SELinux can be confirmed or ruled out by doing "setenforce 0"
and then trying the operation again.

Then "setenforce 1" again afterwards, of course.

Cheers
Tony
-- 
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org