Rsync Service Setup

Source: Internet
Author: User

1, first to turn off firewall iptables and SELinux (service iptables stop Sentenforce 0 temporary shutdown)

2 Change the configuration file/etc/rsyncd.cong specific configuration as follows:

port=873Default Listener Portcan be changed to another: for example: 8730
log file=/var/log/rsync.log//Journal file
PID File=/var/run/rsync.pidProcess Number Storage File 
[hu]//module name (custom)
path=/tmp/rsync//directory
Use chroot=yes//Limit Change directory
Max connections=4//maximum number of connections
Read Only=yesRead-only   (if it is read-only, the client cannot upload the file to the server)
List=yes//Whether the module name is displayed
uid=root//user used in data transfer
Gid=root//The group name used for data transfer
Auth Users=hu//Set up an account to connect to the server
Secrets file=/etc/rs.passwdSet Password filethe privilege should be 600 or more.
hosts allow=192.168.75.0/255.255.255.0To set allowed host connections

Note: The format of the password file is: user:passwd

echo "/usr/bin/rsync--daemon" >>/etc/rc.local if you want to start the boot every time

Client Operation:

RSYNC-AVZP [email protected]::hu/1/txt./use User "Hu" to copy 1.1 above hu/files to the client's./directory

If the newspaper "cannot find/etc/rs.passwd this file error, should be the file permissions problem, if you use root to change the permissions of this file, and then use the ordinary user to execute this command will not find the file, the workaround can change the permissions 444 or change the owner of the file."

This article is from the "Linux" blog, so be sure to keep this source http://825536458.blog.51cto.com/4417836/1681787

Rsync Service Setup

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.