📄 rsyncd.conf.yo
字号:
message telling them to try later. The default is 0, which means no limit.A negative value disables the module.See also the "lock file" parameter.dit(bf(log file)) When the "log file" parameter is set to a non-emptystring, the rsync daemon will log messages to the indicated file ratherthan using syslog. This is particularly useful on systems (such as AIX)where code(syslog()) doesn't work for chrooted programs. The file isopened before code(chroot()) is called, allowing it to be placed outsidethe 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.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.)dit(bf(syslog facility)) 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 "log file" setting is anon-empty string (either set in the per-modules settings, or inheritedfrom the global settings).dit(bf(max verbosity)) 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.dit(bf(lock file)) This parameter specifies the file to use tosupport the "max connections" 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 tt(/var/run/rsyncd.lock).dit(bf(read only)) This parameter determines whether clientswill be able to upload files or not. If "read only" is true then anyattempted uploads will fail. If "read only" is false then uploads willbe possible if file permissions on the daemon side allow them. The defaultis for all modules to be read only.dit(bf(write only)) This parameter determines whether clientswill be able to download files or not. If "write only" is true then anyattempted downloads will fail. If "write only" is false then downloadswill be possible if file permissions on the daemon side allow them. Thedefault is for this parameter to be disabled.dit(bf(list)) 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.dit(bf(uid)) 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 "gid" parameter this determines whatfile permissions are available. The default is uid -2, which is normallythe user "nobody".dit(bf(gid)) 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 "uid" parameter. The default is gid -2,which is normally the group "nobody".dit(bf(fake super)) Setting "fake super = yes" for a module causes thedaemon side to behave as if the bf(--fake-user) 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.dit(bf(filter)) 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 (bf(daemon-excluded) 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.The daemon filter chain is built from the "filter", "include from", "include","exclude from", and "exclude" parameters, in that order of priority. Anchoredpatterns are anchored at the root of the module. To prevent access to anentire subtree, for example, "/secret", you em(must) exclude everything in thesubtree; the easiest way to do this is with a triple-star pattern like"/secret/***".The "filter" 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. "- /foo - /bar" is parsed as two rules). You may specify one ormore merge-file rules using the normal syntax. Only one "filter" 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 bf(--delete) workbetter during a client download operation if the per-dir merge files areincluded in the transfer and the client requests that they be used.dit(bf(exclude)) This parameter takes a space-separated list of daemonexclude patterns. As with the client bf(--exclude) option, patterns can bequalified with "- " or "+ " to explicitly indicate exclude/include. Only one"exclude" parameter can apply to a given module. See the "filter" parameterfor a description of how excluded files affect the daemon.dit(bf(include)) Use an "include" to override the effects of the "exclude"parameter. Only one "include" parameter can apply to a given module. See the"filter" parameter for a description of how excluded files affect the daemon.dit(bf(exclude from)) This parameter specifies the name of a fileon the daemon that contains daemon exclude patterns, one per line. Only one"exclude from" parameter can apply to a given module; if you have multipleexclude-from files, you can specify them as a merge file in the "filter"parameter. See the "filter" parameter for a description of how excluded filesaffect the daemon.dit(bf(include from)) Analogue of "exclude from" for a file of daemon includepatterns. Only one "include from" parameter can apply to a given module. Seethe "filter" parameter for a description of how excluded files affect thedaemon.dit(bf(incoming chmod)) 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 bf(--perms).See the description of the bf(--chmod) rsync option and the bf(chmod)(1)manpage for information on the format of this string.dit(bf(outgoing chmod)) 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 bf(--chmod) rsync option and the bf(chmod)(1)manpage for information on the format of this string.dit(bf(auth users)) 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"auth users" 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"secrets file" parameter. The default is for all users to be able toconnect without a password (this is called "anonymous rsync").See also the "CONNECTING TO AN RSYNC DAEMON OVER A REMOTE SHELLPROGRAM" section in bf(rsync)(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.dit(bf(secrets file)) This parameter specifies the name ofa file that contains the username:password pairs used forauthenticating this module. This file is only consulted if the "authusers" 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.There is no default for the "secrets file" parameter, you must choose a name(such as tt(/etc/rsyncd.secrets)). The file must normally not be readableby "other"; see "strict modes".dit(bf(strict modes)) This parameter determines whether or notthe permissions on the secrets file will be checked. If "strict modes" istrue, then the secrets file must not be readable by any user ID otherthan the one that the rsync daemon is running under. If "strict modes" isfalse, the check is not performed. The default is true. This parameterwas added to accommodate rsync running on the Windows operating system.dit(bf(hosts allow)) 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.Each pattern can be in one of five forms:quote(itemization( it() a dotted decimal IPv4 address of the form a.b.c.d, or an IPv6 address of the form a:b:c::d:e:f. In this case the incoming machine's IP address must match exactly. it() an address/mask in the form ipaddr/n where ipaddr is the IP address and n is the number of one bits in the netmask. All IP addresses which match the masked IP address will be allowed in. it() an address/mask in the form ipaddr/maskaddr where ipaddr is the IP 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 IP addresses which match the masked IP address will be allowed in. it() a hostname. The hostname as determined by a reverse lookup will be matched (case insensitive) against the pattern. Only an exact match is allowed in. it() a hostname pattern using wildcards. These are matched using the same rules as normal unix filename matching. If the pattern matches then the client is allowed in.))Note IPv6 link-local addresses can have a scope in the address specification:quote(tt( fe80::1%link1)nl()tt( fe80::%link1/64)nl()tt( fe80::%link1/ffff:ffff:ffff:ffff::)nl())You can also combine "hosts allow" with a separate "hosts deny"parameter. If both parameters are specified then the "hosts allow" parameter ischecked first and a match results in the client being able toconnect. The "hosts deny" parameter is then checked and a match meansthat the host is rejected. If the host does not match either the"hosts allow" or the "hosts deny" patterns then it is allowed toconnect.The default is no "hosts allow" parameter, which means all hosts can connect.dit(bf(hosts deny)) 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 "hosts allow" parameter for more information.The default is no "hosts deny" parameter, which means all hosts can connect.dit(bf(ignore errors)) 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 bf(--delete) 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.dit(bf(ignore nonreadable)) 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.dit(bf(transfer logging)) 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.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -