INFORMATICS

The Best

yum/dnf error: Failed to download metadata for repo

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive

 Problem with yum update

ERROR:

[root@b1s tmp]# yum update
Extra Packages for Enterprise Linux Modular 8 - x86_64 148 kB/s | 117 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 2.6 MB/s | 8.0 MB 00:03
created by dnf config-manager from file:///root/= 0.0 B/s | 0 B 00:00
Errors during downloading metadata for repository 'root_':
- Curl error (37): Couldn't read a file:// file for file:///root/=/repodata/repomd.xml [Couldn't open file /root/=/repodata/repomd.xml]
Błąd: Failed to download metadata for repo 'root_': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

 

Open folder /etc/yum.repos.d

delete epel repository - files with new date

How to Disable SELinux on CentOS 8

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive

How to temporarily Disable SELinux on CentOS 8

Before you start disabling SELinux on CentOS 8, it’s prudent that you first check the status of SELinux.

Installing vsftpd on CentOS 8

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive

Installing vsftpd on CentOS 8

# dnf install -y vsftpd

Take backup of existing vsftpd.conf file.

# cp /etc/vsftpd/vsftpd.conf /etc/vsftpd/vsftpd.conf.org

Edit vsftpd configuration file.

# vi /etc/vsftpd/vsftpd.conf

Open FTP port 21 on the system firewall to allow access to FTP services from external systems.

# firewall-cmd --zone=public --permanent --add-port=20-21/tcp

# firewall-cmd --permanent --add-port=30000-31000/tcp

or # firewall-cmd --add-service=ftp --permanent
# firewall-cmd --reload

Set the following parameters with these corresponding values

anonymous_enable=NO  # line 12: make sure value is [NO] (no anonymous)           
local_enable=YES 		
write_enable=YES		
local_umask=022		        
dirmessage_enable=YES	        
xferlog_enable=YES		
connect_from_port_20=YES        
xferlog_std_format=YES          
listen=NO  # line 115: change (if listening IPv4 only) 	if listning IPv4 and IPv6 both, specify [NO]		
listen_ipv6=YES		        
pam_service_name=vsftpd 
use_localtime=YES

Configure User List in Secure FTP Server:

Users that are allowed/deny to use FTP service are listed in a user_list file.

Default user_list file is located at /etc/vsftpd/user_list, we can add or remove FTP users in this file.

By default, all the users in the user_list are denied to access FTP service.

We have to explicitly allow users in user_list by setting following directives in vsftpd.conf file.

userlist_enable=YES # enable vsftpd to load usernames
userlist_deny=NO # allow access to users in userlist

 

Enable Chroot Jail for Secure FTP Server on CentOS 8:
To restrict FTP users in a chrooted environment, add following two directives in vsftpd.conf file.

chroot_local_user=YES # Create chrooted environment for users
allow_writeable_chroot=YES # Allow write permission to user on chroot jail directory

 

For security, you can also enable TLS encryption

 Create a CentOS 8 User to access Secure FTP Service:
# useradd new_user
# passwd new_user

Add this user to allowed user_list.

# echo ahmer >> /etc/vsftpd/user_list

 

How to Stop and Disable Firewalld on CentOS 8

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive

How to Stop and Disable Firewalld on CentOS 8

FirewallD is a complete firewall solution that dynamically manages the trust level of network connections and interfaces. Firewalld gives you full control over what traffic is allowed or disallowed to and from the system.

 

Step 1 

Check the Firewall Status

# firewall-cmd --state

or 

# systemctl status firewalld

 

Step 2 

Disable Firewall

You can temporarily stop the FirewallD service with the following command:

# systemctl stop firewalld

Disable the FirewallD service to start automatically on system boot:

# systemctl disable firewalld

 

 

 

 

Search