Experimental scene:
Rsync remote synchronization
Failure phenomenon:
When doing rsync remote synchronization, the following command is entered on the originating side to invoke the secret-free synchronization file
rsync -az --delete --password-file=/etc/server.txt [email protected]::wwwroot /opt/
Error reporting phenomenon:
Troubleshooting and solutions:
password file cannot be accessed by other users.
is the original password file can only be read and written by the owner, can not be read by other users, this is not secure! The default permission of the file created by
is 644. It needs to be set to 600
. Therefore, the following command is needed to set the permission of the password file:
chmod 600 server.txt