Mention how the daemon handles a failure to open a user-specified
[rsync/rsync.git] / rsyncd.conf.yo
index 11740c9..47e47ae 100644 (file)
@@ -1,5 +1,5 @@
 mailto(rsync-bugs@samba.org)
-manpage(rsyncd.conf)(5)(30 Sep 2004)()()
+manpage(rsyncd.conf)(5)(30 Mar 2005)()()
 manpagename(rsyncd.conf)(configuration file for rsync server)
 manpagesynopsis()
 
@@ -90,7 +90,10 @@ is no motd file.
 dit(bf(log file)) The "log file" option tells the rsync daemon to log
 messages to that file rather than using syslog. This is particularly
 useful on systems (such as AIX) where syslog() doesn't work for
-chrooted programs.
+chrooted programs.  If the daemon fails to open to specified file, it
+will fall back to using syslog and output an error about the failure.
+(Note that a failure to open the specified log file used to be a fatal
+error.)
 
 dit(bf(pid file)) The "pid file" option tells the rsync daemon to write
 its process ID to that file.
@@ -156,9 +159,14 @@ Note that you are free to setup user/group information in the chroot area
 differently from your normal system.  For example, you could abbreviate
 the list of users and groups.  Also, you can protect this information from
 being downloaded/uploaded by adding an exclude rule to the rsync.conf file
-(e.g. "exclude = /etc/").  Note that having the exclusion affect uploads
+(e.g. "exclude = /etc/**").  Note that having the exclusion affect uploads
 is a relatively new feature in rsync, so make sure your server is running
-at least 2.6.3 to effect this.
+at least 2.6.3 to effect this.  Also note that it is safest to exclude a
+directory and all its contents combining the rule "/some/dir/" with the
+rule "/some/dir/**" just to be sure that rsync will not allow deeper
+access to some of the excluded files inside the directory (rsync tries to
+do this automatically, but you might as well specify both to be extra
+sure).
 
 dit(bf(port)) You can override the default port the daemon will listen on
 by specifying this value (defaults to 873).  This is ignored if the daemon
@@ -366,11 +374,19 @@ if a transfer is aborted, no mention will be made in the log file.
 If you want to customize the log lines, see the "log format" option.
 
 dit(bf(log format)) The "log format" option allows you to specify the
-format used for logging file transfers when transfer logging is
-enabled. The format is a text string containing embedded single
-character escape sequences prefixed with a percent (%) character.
+format used for logging file transfers when transfer logging is enabled.
+The format is a text string containing embedded single-character escape
+sequences prefixed with a percent (%) character.  An optional numeric
+field width may also be specified between the percent and the escape
+letter (e.g. "%-50n %8l %07p").
 
-The prefixes that are understood are:
+The default log format is "%o %h [%a] %m (%u) %f %l", and a "%t [%p] "
+is always prefixed when using the "log file" option.
+(A perl script that will summarize this default log format is included
+in the rsync source code distribution in the "support" subdirectory:
+rsyncstats.)
+
+The single-character escapes that are understood are as follows:
 
 quote(itemize(
   it() %h for the remote host name
@@ -378,9 +394,11 @@ quote(itemize(
   it() %l for the length of the file in bytes
   it() %p for the process ID of this rsync session
   it() %o for the operation, which is "send", "recv", or "del."
+  (the latter includes the trailing period)
   it() %f for the filename (long form on sender; no trailing "/")
   it() %n for the filename (short form; trailing "/" on dir)
-  it() %L either the string " -> SYMLINK" or "" if not a symlink
+  it() %L either the string " -> SYMLINK", or " => HARDLINK" or an
+  empty string (where bf(SYMLINK) or bf(HARDLINK) is a filename)
   it() %P for the module path
   it() %m for the module name
   it() %t for the current date time
@@ -391,54 +409,12 @@ quote(itemize(
   it() %i an itemized list of what is being updated
 ))
 
-The default log format is "%o %h [%a] %m (%u) %f %l", and a "%t [%p] "
-is always prefixed when using the "log file" option.
-
-A perl script called rsyncstats to summarize this format is included
-in the rsync source code distribution in the "support" subdirectory.
-
-The %i format is a set of cryptic characters that are output as follows:
-
-quote(tt(  =Xcstpog ITEM_NAME))
-
-The bf(=) is output as either a bf(<) (receive) or a bf(>) (send) if the
-item is being transferred, a bf(.) if only the attributes are being
-updated, or a bf(=) if the items are identical.  Note that when a symlink
-or a device gets its value changed, that is considered to be a transfer (as
-opposed to a change in permissions or ownership).
-
-The bf(X) will be replaced by one of the following: an "f" for a file, a
-"d" for a dir, an "L" for a symlink, or a "D" for a device.
-
-The rest of the letters in the string above are the actual letters that
-will be output if the associated attribute for the item is being updated or
-a "." for no change.  Three exceptions to this are: (1) a newly created
-item replaces each letter with a "+", (2) an identical item replaces each
-letter with a space, and (3) an unknown attribute replaces each letter with
-a "?" (this happens when talking to an older rsync).
-
-The attribute that is associated with each letter is as follows:
-
-quote(itemize(
-  it() A bf(c) means the checksum of the file is different and will be
-  updated by the file transfer (requries bf(--checksum)).
-  it() A bf(s) means the size of the file is different and will be updated
-  by the file transfer.
-  it() A bf(t) means the modified time is different and is being updated to
-  the server's value (requires bf(--times)).  An alternate value of bf(T)
-  means that the time will be set to the transfer time, which happens
-  anytime a symlink is transferred, or when a file or device is transferred
-  without bf(--times).
-  it() A bf(p) means the permissions are different and are being updated to
-  the server's value (requires bf(--perms)).
-  it() An bf(o) means the owner is being updated (requires bf(--owner) and
-  root privileges).
-  it() A bf(g) means the group is being updated (requires bf(--group) and
-  the authority to set the requested group).
-))
+For a list of what the characters mean that are output by "%i", see the
+bf(--itemize-changes) option in the rsync manpage.
 
-One other output is possible: when deleting files, each deleted file will
-be logged with the "%i" taking on a value of "deleting".
+Note that some of the logged output changes when talking with older
+rsync versions.  For instance, deleted files were only output as verbose
+messages prior to rsync 2.6.4.
 
 dit(bf(timeout)) The "timeout" option allows you to override the
 clients choice for I/O timeout for this module. Using this option you
@@ -459,6 +435,10 @@ quote(tt(    refuse options = c delete))
 
 The reason the above refuses all delete options is that the options imply
 bf(--delete), and implied options are refused just like explicit options.
+As an additional safety feature, the refusal of "delete" also refuses
+bf(remove-sent-files) when the daemon is the sender; if you want the latter
+without the former, instead refuse "delete-*" -- that refuses all the
+delete modes without affecting bf(--remove-sent-files).
 
 When an option is refused, the server prints an error message and exits.
 To prevent all compression, you can use "dont compress = *" (see below)