Typically, the rsync tool operates through the secure shell (SSH) protocol when synchronizing files between a client on a local system and a host situated remotely. Nevertheless, there is an alternative to execute it as a daemon if the user prefers not to utilize the ssh protocol. Due to the absence of encryption in the …
Author: Albert
SELinux context is not preserved during rsync
The preservation of SELinux context is not maintained during a rsync operation due to the absence of the xattr feature on the target NFS file system. Running rsync with the options -X does not preserve SELinux context and observes apparent errors such as ** security.selinux failed: Operation not supported. Method 1 - Utilize the tar …
How to create a modified CentOS / AlmaLinux ISO with kickstart file or modified installation media?
These steps will only work for the x86_64 system. For other systems, the steps may be different. The mkksiso tool, which is part of the lorax package and comes with CentOS 8 and CentOS 9, lets you add a kickstart file to an ISO file. All systems can use it. Purchase Dedicated Servers Select, configure, …
Why are scripts under /etc/sysconfig/network-scripts directory are gone on AlmaLinux 8/AlmaLinux 9?
Some of the issues faced by system engineers are; Why are files in /etc/sysconfig/network-scripts ignored? Where are interface configs now? I changed a config in an ifcfg-file in directory /etc/sysconfig/network-scripts. Why does the system ignore these changes? A configuration file for each interface should be placed in either the /etc/NetworkManager/system-connections or the /etc/sysconfig/network-scripts directory for …
How to backup old files before override them in rsync?
How to back up the old files on the target server before rsync replaces them with new ones? Use --backup option in rsync. For instance, # rsync -a --backup --backup-dir="/version2" /var/log/ root@192.168.122.246:/var-log-bk/ This command will copy files from local /var/log to root@192.168.1.100:/var-log-bk/ if rsync overrides some files in 192.168.1.100:/var-log-bk/. It will back up those files …
How to avoid password prompt input with rsync?
You are given a password input prompt when transferring files to a different server with rsync. $ rsync -avz /data root@srv::files Password: There are two ways to use the RSYNC_PASSWORD environment variable and the --password-file option. Using the environment variable $ export RSYNC_PASSWORD=secret $ rsync -avz /data root@srv::files or $ RSYNC_PASSWORD=secret rsync -avz /data root@srv::files …
How to avc_cache_threshold persistently in CentOS?
The current runtime is set by the following command. # echo 8192 > /sys/fs/selinux/avc/cache_threshold If you want to keep this change, you can run the two commands below to add them to startup. # echo "echo 8192 > /sys/fs/selinux/avc/cache_thresshold" >> /etc/rc.d/rc.local # chmod +x /etc/rc.d/rc.local Purchase Dedicated Servers Select, configure, and buy! Click Here
Why CentOS ignore packets when the route for outbound traffic differs from the route of incoming traffic?
To resolve this issue, set the net.ipv4.conf.all.rp_filter kernel tunable parameter value to 2. sysctl -w net.ipv4.conf.all.rp_filter=2 To make this change persistent across reboots, add the tunable to the /etc/sysctl.conf file. Strict filtering means that when a packet comes into the system, the kernel looks up the source IP in its routing table to see if …
How to exclude more than one directory with rsync?
To exclude a directory with rsync, use -av and -e. # rsync -av -e --exclude='/path/' ip:/path/to/destination To exclude multiple directories with rsync, use -av and -e again. # rsync -av -e --exclude='/path/to/file' --exclude='/path2/*' ip:/path/to/destination Purchase Dedicated Servers Select, configure, and buy! Click Here
How to view the progress of an rsync job?
If you are running an rsync job that is backing up large amounts of data, you may want to make sure everything is proceeding normally by being able to view the progress of the rsync job. You need to add the progress option using either method. (--progress or -P) ~]# rsync -a --progress /tmp/ backup/ …
How to install an RPM package into a different directory?
A relocatable RPM package can change its installation path during the setup process. Not all RPM packages can be installed into a custom directory. Use the following command to see if a specific package can be relocated. # rpm -qpi <rpm package> | grep Relocations To check rpm packages, centos-lsb-1.3-3.1.EL3.i386.rpm and rsync-2.5.7-5.3E.i386.rpm: # rpm -qpi …
How to use setroubleshoot to get solution for AVC messages?
Install setroubleshoot-server as follows. # yum install -y setroubleshoot-server If the system is in enforcing or permissive mode, setroubleshoot will provide a user-friendly explanation about the AVC's. When there's AVC denial, messages like those below will print to /var/log/messages. Jul 14 09:52:03 desktop setroubleshoot: SELinux is preventing 57656220436F6E74656E74 from write access on the file firefox52.pdf. …
How to configure SELinux to allow SSHD running on custom port
Install the semanage command as follows. CentOS 5 rpm: policycoreutils CentOS 6 & 7 rpm: policycoreutils-python CentOS / AlmaLinux 8 rpm: policycoreutils-python-utils Execute the following command, replacing PORT with the desired TCP port number (11111). # semanage port -a -t ssh_port_t -p tcp PORT If a standard port is chosen, such as 443, the command …
How to disable SELinux in CentOS Linux and AlmaLinux?
Disabling SELinux is not advised. Only turn off SELinux if your regulatory framework permits you to omit some measures of security reporting and enforcement. If SELinux is later turned on, files made while disabled will not have the proper labels. If you decide to turn SELinux back on, you'll need to rename all of your …
How to resolve error firmware.sh[8473]: Cannot find firmware file ‘intel-ucode/06-3f-02’
To resolve this error, upgrade the BIOS/Firmware software to the latest version available. These are just informational messages which are logged on the server. Whenever a new CPU is added, the firmware script checks for that CPU's firmware and requests for firmware. Hence the message is logged in the messages file. # cat var/log/messages*|grep firmware …