📄 rsyncd.conf.5
字号:
the transfer. If this value is set on a per-module basis instead ofglobally, the global log will still contain any authorization failuresor config-file error messages..IP If the daemon fails to open the specified file, it will fall back tousing syslog and output an error about the failure. (Note that thefailure to open the specified log file used to be a fatal error.).IP .IP "\fBsyslog facility\fP"This parameter allows you tospecify the syslog facility name to use when logging messages from thersync daemon. You may use any standard syslog facility name which isdefined on your system. Common names are auth, authpriv, cron, daemon,ftp, kern, lpr, mail, news, security, syslog, user, uucp, local0,local1, local2, local3, local4, local5, local6 and local7. The defaultis daemon. This setting has no effect if the \(lqlog file\(rq setting is anon-empty string (either set in the per-modules settings, or inheritedfrom the global settings)..IP .IP "\fBmax verbosity\fP"This parameter allows you to controlthe maximum amount of verbose information that you'll allow the daemon togenerate (since the information goes into the log file). The default is 1,which allows the client to request one level of verbosity..IP .IP "\fBlock file\fP"This parameter specifies the file to use tosupport the \(lqmax connections\(rq parameter. The rsync daemon uses recordlocking on this file to ensure that the max connections limit is notexceeded for the modules sharing the lock file.The default is \f(CW/var/run/rsyncd.lock\fP..IP .IP "\fBread only\fP"This parameter determines whether clientswill be able to upload files or not. If \(lqread only\(rq is true then anyattempted uploads will fail. If \(lqread only\(rq is false then uploads willbe possible if file permissions on the daemon side allow them. The defaultis for all modules to be read only..IP .IP "\fBwrite only\fP"This parameter determines whether clientswill be able to download files or not. If \(lqwrite only\(rq is true then anyattempted downloads will fail. If \(lqwrite only\(rq is false then downloadswill be possible if file permissions on the daemon side allow them. Thedefault is for this parameter to be disabled..IP .IP "\fBlist\fP"This parameter determines if this module should belisted when the client asks for a listing of available modules. Bysetting this to false you can create hidden modules. The default isfor modules to be listable..IP .IP "\fBuid\fP"This parameter specifies the user name or user ID thatfile transfers to and from that module should take place as when the daemonwas run as root. In combination with the \(lqgid\(rq parameter this determines whatfile permissions are available. The default is uid \-2, which is normallythe user \(lqnobody\(rq..IP .IP "\fBgid\fP"This parameter specifies the group name or group ID thatfile transfers to and from that module should take place as when the daemonwas run as root. This complements the \(lquid\(rq parameter. The default is gid \-2,which is normally the group \(lqnobody\(rq..IP .IP "\fBfake super\fP"Setting \(lqfake super = yes\(rq for a module causes thedaemon side to behave as if the \fB\-\-fake\-user\fP command-line option hadbeen specified. This allows the full attributes of a file to be storedwithout having to have the daemon actually running as root..IP .IP "\fBfilter\fP"The daemon has its own filter chain that determines what filesit will let the client access. This chain is not sent to the client and isindependent of any filters the client may have specified. Files excluded bythe daemon filter chain (\fBdaemon-excluded\fP files) are treated as non-existentif the client tries to pull them, are skipped with an error message if theclient tries to push them (triggering exit code 23), and are never deleted fromthe module. You can use daemon filters to prevent clients from downloading ortampering with private administrative files, such as files you may add tosupport uid/gid name translations..IP The daemon filter chain is built from the \(lqfilter\(rq, \(lqinclude from\(rq, \(lqinclude\(rq,\(lqexclude from\(rq, and \(lqexclude\(rq parameters, in that order of priority. Anchoredpatterns are anchored at the root of the module. To prevent access to anentire subtree, for example, \(lq/secret\(rq, you \fImust\fP exclude everything in thesubtree; the easiest way to do this is with a triple-star pattern like\(lq/secret/***\(rq..IP The \(lqfilter\(rq parameter takes a space-separated list of daemon filter rules,though it is smart enough to know not to split a token at an internal space ina rule (e.g. \(lq\- /foo \(em /bar\(rq is parsed as two rules). You may specify one ormore merge-file rules using the normal syntax. Only one \(lqfilter\(rq parameter canapply to a given module in the config file, so put all the rules you want in asingle parameter. Note that per-directory merge-file rules do not provide asmuch protection as global rules, but they can be used to make \fB\-\-delete\fP workbetter during a client download operation if the per-dir merge files areincluded in the transfer and the client requests that they be used..IP .IP "\fBexclude\fP"This parameter takes a space-separated list of daemonexclude patterns. As with the client \fB\-\-exclude\fP option, patterns can bequalified with \(lq\- \(rq or \(lq+ \(rq to explicitly indicate exclude/include. Only one\(lqexclude\(rq parameter can apply to a given module. See the \(lqfilter\(rq parameterfor a description of how excluded files affect the daemon..IP .IP "\fBinclude\fP"Use an \(lqinclude\(rq to override the effects of the \(lqexclude\(rqparameter. Only one \(lqinclude\(rq parameter can apply to a given module. See the\(lqfilter\(rq parameter for a description of how excluded files affect the daemon..IP .IP "\fBexclude from\fP"This parameter specifies the name of a fileon the daemon that contains daemon exclude patterns, one per line. Only one\(lqexclude from\(rq parameter can apply to a given module; if you have multipleexclude-from files, you can specify them as a merge file in the \(lqfilter\(rqparameter. See the \(lqfilter\(rq parameter for a description of how excluded filesaffect the daemon..IP .IP "\fBinclude from\fP"Analogue of \(lqexclude from\(rq for a file of daemon includepatterns. Only one \(lqinclude from\(rq parameter can apply to a given module. Seethe \(lqfilter\(rq parameter for a description of how excluded files affect thedaemon..IP .IP "\fBincoming chmod\fP"This parameter allows you to specify a set ofcomma-separated chmod strings that will affect the permissions of allincoming files (files that are being received by the daemon). Thesechanges happen after all other permission calculations, and this willeven override destination-default and/or existing permissions when theclient does not specify \fB\-\-perms\fP.See the description of the \fB\-\-chmod\fP rsync option and the \fBchmod\fP(1)manpage for information on the format of this string..IP .IP "\fBoutgoing chmod\fP"This parameter allows you to specify a set ofcomma-separated chmod strings that will affect the permissions of alloutgoing files (files that are being sent out from the daemon). Thesechanges happen first, making the sent permissions appear to be differentthan those stored in the filesystem itself. For instance, you coulddisable group write permissions on the server while having it appear tobe on to the clients.See the description of the \fB\-\-chmod\fP rsync option and the \fBchmod\fP(1)manpage for information on the format of this string..IP .IP "\fBauth users\fP"This parameter specifies a comma andspace-separated list of usernames that will be allowed to connect tothis module. The usernames do not need to exist on the localsystem. The usernames may also contain shell wildcard characters. If\(lqauth users\(rq is set then the client will be challenged to supply ausername and password to connect to the module. A challenge responseauthentication protocol is used for this exchange. The plain textusernames and passwords are stored in the file specified by the\(lqsecrets file\(rq parameter. The default is for all users to be able toconnect without a password (this is called \(lqanonymous rsync\(rq)..IP See also the \(lqCONNECTING TO AN RSYNC DAEMON OVER A REMOTE SHELLPROGRAM\(rq section in \fBrsync\fP(1) for information on how handle anrsyncd.conf\-level username that differs from the remote-shell-levelusername when using a remote shell to connect to an rsync daemon..IP .IP "\fBsecrets file\fP"This parameter specifies the name ofa file that contains the username:password pairs used forauthenticating this module. This file is only consulted if the \(lqauthusers\(rq parameter is specified. The file is line based and containsusername:password pairs separated by a single colon. Any line startingwith a hash (#) is considered a comment and is skipped. The passwordscan contain any characters but be warned that many operating systemslimit the length of passwords that can be typed at the client end, soyou may find that passwords longer than 8 characters don't work..IP There is no default for the \(lqsecrets file\(rq parameter, you must choose a name(such as \f(CW/etc/rsyncd.secrets\fP). The file must normally not be readableby \(lqother\(rq; see \(lqstrict modes\(rq..IP .IP "\fBstrict modes\fP"This parameter determines whether or notthe permissions on the secrets file will be checked. If \(lqstrict modes\(rq istrue, then the secrets file must not be readable by any user ID otherthan the one that the rsync daemon is running under. If \(lqstrict modes\(rq isfalse, the check is not performed. The default is true. This parameterwas added to accommodate rsync running on the Windows operating system..IP .IP "\fBhosts allow\fP"This parameter allows you to specify alist of patterns that are matched against a connecting clientshostname and IP address. If none of the patterns match then theconnection is rejected..IP Each pattern can be in one of five forms:.IP .RS .IP o a dotted decimal IPv4 address of the form a.b.c.d, or an IPv6 addressof the form a:b:c::d:e:f. In this case the incoming machine's IP addressmust match exactly..IP o an address/mask in the form ipaddr/n where ipaddr is the IP addressand n is the number of one bits in the netmask. All IP addresses whichmatch the masked IP address will be allowed in..IP o an address/mask in the form ipaddr/maskaddr where ipaddr is theIP address and maskaddr is the netmask in dotted decimal notation for IPv4,or similar for IPv6, e.g. ffff:ffff:ffff:ffff:: instead of /64. All IPaddresses which match the masked IP address will be allowed in..IP o a hostname. The hostname as determined by a reverse lookup willbe matched (case insensitive) against the pattern. Only an exactmatch is allowed in..IP o a hostname pattern using wildcards. These are matched using thesame rules as normal unix filename matching. If the pattern matchesthen the client is allowed in..RE.IP Note IPv6 link-local addresses can have a scope in the address specification:.IP .RS \f(CW fe80::1%link1\fP.br \f(CW fe80::%link1/64\fP.br \f(CW fe80::%link1/ffff:ffff:ffff:ffff::\fP.br .RE.IP You can also combine \(lqhosts allow\(rq with a separate \(lqhosts deny\(rqparameter. If both parameters are specified then the \(lqhosts allow\(rq parameter ischecked first and a match results in the client being able toconnect. The \(lqhosts deny\(rq parameter is then checked and a match meansthat the host is rejected. If the host does not match either the\(lqhosts allow\(rq or the \(lqhosts deny\(rq patterns then it is allowed toconnect..IP The default is no \(lqhosts allow\(rq parameter, which means all hosts can connect..IP .IP "\fBhosts deny\fP"This parameter allows you to specify alist of patterns that are matched against a connecting clientshostname and IP address. If the pattern matches then the connection isrejected. See the \(lqhosts allow\(rq parameter for more information..IP The default is no \(lqhosts deny\(rq parameter, which means all hosts can connect..IP .IP "\fBignore errors\fP"This parameter tells rsyncd toignore I/O errors on the daemon when deciding whether to run the deletephase of the transfer. Normally rsync skips the \fB\-\-delete\fP step if anyI/O errors have occurred in order to prevent disastrous deletion dueto a temporary resource shortage or other I/O error. In some cases thistest is counter productive so you can use this parameter to turn off thisbehavior..IP .IP "\fBignore nonreadable\fP"This tells the rsync daemon to completelyignore files that are not readable by the user. This is useful forpublic archives that may have some non-readable files among thedirectories, and the sysadmin doesn't want those files to be seen at all..IP .IP "\fBtransfer logging\fP"This parameter enables per-filelogging of downloads and uploads in a format somewhat similar to thatused by ftp daemons. The daemon always logs the transfer at the end, soif a transfer is aborted, no mention will be made in the log file..IP If you want to customize the log lines, see the \(lqlog format\(rq parameter..IP .IP "\fBlog format\fP"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. \(lq\fB%\-50n %8l %07p\fP\(rq)..IP The default log format is \(lq%o %h [%a] %m (%u) %f %l\(rq, and a \(lq%t [%p] \(rqis always prefixed when using the \(lqlog file\(rq parameter.(A perl script that will summarize this default log format is includedin the rsync source code distribution in the \(lqsupport\(rq subdirectory:rsyncstats.).IP The single-character escapes that are understood are as follows:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -