📄 rsyncd.conf.5
字号:
.IP .RS .IP o %a the remote IP address.IP o %b the number of bytes actually transferred.IP o %B the permission bits of the file (e.g. rwxrwxrwt).IP o %c the total size of the block checksums received for the basis file (only when sending).IP o %f the filename (long form on sender; no trailing \(lq/\(rq).IP o %G the gid of the file (decimal) or \(lqDEFAULT\(rq.IP o %h the remote host name.IP o %i an itemized list of what is being updated.IP o %l the length of the file in bytes.IP o %L the string \(lq \-> SYMLINK\(rq, \(lq => HARDLINK\(rq, or \(lq\(rq (where \fBSYMLINK\fP or \fBHARDLINK\fP is a filename).IP o %m the module name.IP o %M the last-modified time of the file.IP o %n the filename (short form; trailing \(lq/\(rq on dir).IP o %o the operation, which is \(lqsend\(rq, \(lqrecv\(rq, or \(lqdel.\(rq (the latter includes the trailing period).IP o %p the process ID of this rsync session.IP o %P the module path.IP o %t the current date time.IP o %u the authenticated username or an empty string.IP o %U the uid of the file (decimal).RE.IP For a list of what the characters mean that are output by \(lq%i\(rq, see the\fB\-\-itemize\-changes\fP option in the rsync manpage..IP Note that some of the logged output changes when talking with olderrsync versions. For instance, deleted files were only output as verbosemessages prior to rsync 2.6.4..IP .IP "\fBtimeout\fP"This parameter allows you to override theclients choice for I/O timeout for this module. Using this parameter youcan ensure that rsync won't wait on a dead client forever. The timeoutis specified in seconds. A value of zero means no timeout and is thedefault. A good choice for anonymous rsync daemons may be 600 (givinga 10 minute timeout)..IP .IP "\fBrefuse options\fP"This parameter allows you tospecify a space-separated list of rsync command line options that willbe refused by your rsync daemon.You may specify the full option name, its one-letter abbreviation, or awild-card string that matches multiple options.For example, this would refuse \fB\-\-checksum\fP (\fB\-c\fP) and all the variousdelete options:.IP .RS \f(CW refuse options = c delete\fP.RE.IP The reason the above refuses all delete options is that the options imply\fB\-\-delete\fP, and implied options are refused just like explicit options.As an additional safety feature, the refusal of \(lqdelete\(rq also refuses\fBremove-source-files\fP when the daemon is the sender; if you want the latterwithout the former, instead refuse \(lqdelete\-*\(rq \(em that refuses all thedelete modes without affecting \fB\-\-remove\-source\-files\fP..IP When an option is refused, the daemon prints an error message and exits.To prevent all compression when serving files,you can use \(lqdont compress = *\(rq (see below)instead of \(lqrefuse options = compress\(rq to avoid returning an error to aclient that requests compression..IP .IP "\fBdont compress\fP"This parameter allows you to selectfilenames based on wildcard patterns that should not be compressedwhen pulling files from the daemon (no analogous parameter exists togovern the pushing of files to a daemon).Compression is expensive in terms of CPU usage, so itis usually good to not try to compress files that won't compress well,such as already compressed files..IP The \(lqdont compress\(rq parameter takes a space-separated list ofcase-insensitive wildcard patterns. Any source filename matching oneof the patterns will not be compressed during transfer..IP See the \fB\-\-skip\-compress\fP parameter in the \fBrsync\fP(1) manpage for the listof file suffixes that are not compressed by default. Specifying a valuefor the \(lqdont compress\(rq parameter changes the default when the daemon isthe sender..IP .IP "\fBpre-xfer exec\fP, \fBpost-xfer exec\fP"You may specify a command to be runbefore and/or after the transfer. If the \fBpre-xfer exec\fP command fails, thetransfer is aborted before it begins..IP The following environment variables will be set, though some arespecific to the pre-xfer or the post-xfer environment:.IP .RS .IP o \fBRSYNC_MODULE_NAME\fP: The name of the module being accessed..IP o \fBRSYNC_MODULE_PATH\fP: The path configured for the module..IP o \fBRSYNC_HOST_ADDR\fP: The accessing host's IP address..IP o \fBRSYNC_HOST_NAME\fP: The accessing host's name..IP o \fBRSYNC_USER_NAME\fP: The accessing user's name (empty if no user)..IP o \fBRSYNC_PID\fP: A unique number for this transfer..IP o \fBRSYNC_REQUEST\fP: (pre-xfer only) The module/path info specifiedby the user (note that the user can specify multiple source files,so the request can be something like \(lqmod/path1 mod/path2\(rq, etc.)..IP o \fBRSYNC_ARG#\fP: (pre-xfer only) The pre-request arguments are setin these numbered values. RSYNC_ARG0 is always \(lqrsyncd\(rq, and the lastvalue contains a single period..IP o \fBRSYNC_EXIT_STATUS\fP: (post-xfer only) the server side's exit value.This will be 0 for a successful run, a positive value for an error that theserver generated, or a \-1 if rsync failed to exit properly. Note that anerror that occurs on the client side does not currently get sent to theserver side, so this is not the final exit status for the whole transfer..IP o \fBRSYNC_RAW_STATUS\fP: (post-xfer only) the raw exit value from \f(CWwaitpid()\fP\&..RE.IP Even though the commands can be associated with a particular module, theyare run using the permissions of the user that started the daemon (not themodule's uid/gid setting) without any chroot restrictions..IP .SH "AUTHENTICATION STRENGTH".PP The authentication protocol used in rsync is a 128 bit MD4 basedchallenge response system. This is fairly weak protection, though (withat least one brute-force hash-finding algorithm publicly available), soif you want really top-quality security, then I recommend that you runrsync over ssh. (Yes, a future version of rsync will switch over to astronger hashing method.).PP Also note that the rsync daemon protocol does not currently provide anyencryption of the data that is transferred over the connection. Onlyauthentication is provided. Use ssh as the transport if you wantencryption..PP Future versions of rsync may support SSL for better authentication andencryption, but that is still being investigated..PP .SH "EXAMPLES".PP A simple rsyncd.conf file that allow anonymous rsync to a ftp area at\f(CW/home/ftp\fP would be:.PP .nf [ftp] path = /home/ftp comment = ftp export area.fi .PP A more sophisticated example would be:.PP .nf uid = nobodygid = nobodyuse chroot = yesmax connections = 4syslog facility = local5pid file = /var/run/rsyncd.pid[ftp] path = /var/ftp/./pub comment = whole ftp area (approx 6.1 GB)[sambaftp] path = /var/ftp/./pub/samba comment = Samba ftp area (approx 300 MB)[rsyncftp] path = /var/ftp/./pub/rsync comment = rsync ftp area (approx 6 MB)[sambawww] path = /public_html/samba comment = Samba WWW pages (approx 240 MB)[cvs] path = /data/cvs comment = CVS repository (requires authentication) auth users = tridge, susan secrets file = /etc/rsyncd.secrets.fi .PP The /etc/rsyncd.secrets file would look something like this:.PP .RS \f(CWtridge:mypass\fP.br \f(CWsusan:herpass\fP.br .RE.PP .SH "FILES".PP /etc/rsyncd.conf or rsyncd.conf.PP .SH "SEE ALSO".PP \fBrsync\fP(1).PP .SH "DIAGNOSTICS".PP .SH "BUGS".PP Please report bugs! The rsync bug tracking system is online athttp://rsync.samba.org/.PP .SH "VERSION".PP This man page is current for version 3.0.5 of rsync..PP .SH "CREDITS".PP rsync is distributed under the GNU public license. See the fileCOPYING for details..PP The primary ftp site for rsync isftp://rsync.samba.org/pub/rsync..PP A WEB site is available athttp://rsync.samba.org/.PP We would be delighted to hear from you if you like this program..PP This program uses the zlib compression library written by Jean-loupGailly and Mark Adler..PP .SH "THANKS".PP Thanks to Warren Stanley for his original idea and patch for the rsyncdaemon. Thanks to Karsten Thygesen for his many suggestions anddocumentation!.PP .SH "AUTHOR".PP rsync was written by Andrew Tridgell and Paul Mackerras.Many people have later contributed to it..PP Mailing lists for support and development are available athttp://lists.samba.org
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -