⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rsyncd.conf.yo

📁 Rsync 3.0.5 source code
💻 YO
📖 第 1 页 / 共 3 页
字号:
If you want to customize the log lines, see the "log format" parameter.dit(bf(log format)) This parameter allows you to specify theformat used for logging file transfers when transfer logging is enabled.The format is a text string containing embedded single-character escapesequences prefixed with a percent (%) character.  An optional numericfield width may also be specified between the percent and the escapeletter (e.g. "bf(%-50n %8l %07p)").The default log format is "%o %h [%a] %m (%u) %f %l", and a "%t [%p] "is always prefixed when using the "log file" parameter.(A perl script that will summarize this default log format is includedin the rsync source code distribution in the "support" subdirectory:rsyncstats.)The single-character escapes that are understood are as follows:quote(itemization(  it() %a the remote IP address  it() %b the number of bytes actually transferred  it() %B the permission bits of the file (e.g. rwxrwxrwt)  it() %c the total size of the block checksums received for the basis file (only when sending)  it() %f the filename (long form on sender; no trailing "/")  it() %G the gid of the file (decimal) or "DEFAULT"  it() %h the remote host name  it() %i an itemized list of what is being updated  it() %l the length of the file in bytes  it() %L the string " -> SYMLINK", " => HARDLINK", or "" (where bf(SYMLINK) or bf(HARDLINK) is a filename)  it() %m the module name  it() %M the last-modified time of the file  it() %n the filename (short form; trailing "/" on dir)  it() %o the operation, which is "send", "recv", or "del." (the latter includes the trailing period)  it() %p the process ID of this rsync session  it() %P the module path  it() %t the current date time  it() %u the authenticated username or an empty string  it() %U the uid of the file (decimal)))For a list of what the characters mean that are output by "%i", see thebf(--itemize-changes) option in the rsync manpage.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.dit(bf(timeout)) 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).dit(bf(refuse options)) 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 bf(--checksum) (bf(-c)) and all the variousdelete options:quote(tt(    refuse options = c delete))The reason the above refuses all delete options is that the options implybf(--delete), and implied options are refused just like explicit options.As an additional safety feature, the refusal of "delete" also refusesbf(remove-source-files) when the daemon is the sender; if you want the latterwithout the former, instead refuse "delete-*" -- that refuses all thedelete modes without affecting bf(--remove-source-files).When an option is refused, the daemon prints an error message and exits.To prevent all compression when serving files,you can use "dont compress = *" (see below)instead of "refuse options = compress" to avoid returning an error to aclient that requests compression.dit(bf(dont compress)) 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.The "dont compress" parameter takes a space-separated list ofcase-insensitive wildcard patterns. Any source filename matching oneof the patterns will not be compressed during transfer.See the bf(--skip-compress) parameter in the bf(rsync)(1) manpage for the listof file suffixes that are not compressed by default.  Specifying a valuefor the "dont compress" parameter changes the default when the daemon isthe sender.dit(bf(pre-xfer exec), bf(post-xfer exec)) You may specify a command to be runbefore and/or after the transfer.  If the bf(pre-xfer exec) command fails, thetransfer is aborted before it begins.The following environment variables will be set, though some arespecific to the pre-xfer or the post-xfer environment:quote(itemization(  it() bf(RSYNC_MODULE_NAME): The name of the module being accessed.  it() bf(RSYNC_MODULE_PATH): The path configured for the module.  it() bf(RSYNC_HOST_ADDR): The accessing host's IP address.  it() bf(RSYNC_HOST_NAME): The accessing host's name.  it() bf(RSYNC_USER_NAME): The accessing user's name (empty if no user).  it() bf(RSYNC_PID): A unique number for this transfer.  it() bf(RSYNC_REQUEST): (pre-xfer only) The module/path info specified  by the user (note that the user can specify multiple source files,  so the request can be something like "mod/path1 mod/path2", etc.).  it() bf(RSYNC_ARG#): (pre-xfer only) The pre-request arguments are set  in these numbered values. RSYNC_ARG0 is always "rsyncd", and the last  value contains a single period.  it() bf(RSYNC_EXIT_STATUS): (post-xfer only) the server side's exit value.  This will be 0 for a successful run, a positive value for an error that the  server generated, or a -1 if rsync failed to exit properly.  Note that an  error that occurs on the client side does not currently get sent to the  server side, so this is not the final exit status for the whole transfer.  it() bf(RSYNC_RAW_STATUS): (post-xfer only) the raw exit value from code(waitpid()).))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.enddit()manpagesection(AUTHENTICATION STRENGTH)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.)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.Future versions of rsync may support SSL for better authentication andencryption, but that is still being investigated.manpagesection(EXAMPLES)A simple rsyncd.conf file that allow anonymous rsync to a ftp area attt(/home/ftp) would be:verb([ftp]        path = /home/ftp        comment = ftp export area)A more sophisticated example would be:verb(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)The /etc/rsyncd.secrets file would look something like this:quote(tt(tridge:mypass)nl()tt(susan:herpass)nl())manpagefiles()/etc/rsyncd.conf or rsyncd.confmanpageseealso()bf(rsync)(1)manpagediagnostics()manpagebugs()Please report bugs! The rsync bug tracking system is online aturl(http://rsync.samba.org/)(http://rsync.samba.org/)manpagesection(VERSION)This man page is current for version 3.0.5 of rsync.manpagesection(CREDITS)rsync is distributed under the GNU public license.  See the fileCOPYING for details.The primary ftp site for rsync isurl(ftp://rsync.samba.org/pub/rsync)(ftp://rsync.samba.org/pub/rsync).A WEB site is available aturl(http://rsync.samba.org/)(http://rsync.samba.org/)We would be delighted to hear from you if you like this program.This program uses the zlib compression library written by Jean-loupGailly and Mark Adler.manpagesection(THANKS)Thanks to Warren Stanley for his original idea and patch for the rsyncdaemon. Thanks to Karsten Thygesen for his many suggestions anddocumentation!manpageauthor()rsync was written by Andrew Tridgell and Paul Mackerras.Many people have later contributed to it.Mailing lists for support and development are available aturl(http://lists.samba.org)(lists.samba.org)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -