- Updated the address for the FSF in the opening comment.
[rsync/rsync.git] / rsyncd.conf.yo
index 1d60e6a..746ec32 100644 (file)
@@ -1,5 +1,5 @@
 mailto(rsync-bugs@samba.org)
-manpage(rsyncd.conf)(5)(7 Jul 2005)()()
+manpage(rsyncd.conf)(5)(22 Apr 2006)()()
 manpagename(rsyncd.conf)(configuration file for rsync in daemon mode)
 manpagesynopsis()
 
@@ -52,9 +52,6 @@ write the appropriate data, log, and lock files.
 You can launch it either via inetd, as a stand-alone daemon, or from
 an rsync client via a remote shell.  If run as a stand-alone daemon then
 just run the command "bf(rsync --daemon)" from a suitable startup script.
-If run from an rsync client via a remote shell (by specifying both the
-bf(--rsh) (bf(-e)) option and daemon mode with "::" or "rsync://"), the bf(--daemon)
-option is automatically passed to the remote side.
 
 When run via inetd you should add a line like this to /etc/services:
 
@@ -89,7 +86,7 @@ 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
+useful on systems (such as AIX) where code(syslog()) doesn't work for
 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
@@ -117,9 +114,10 @@ being run by inetd, and is superseded by the bf(--address) command-line option.
 dit(bf(socket options)) This option can provide endless fun for people
 who like to tune their systems to the utmost degree. You can set all
 sorts of socket options which may make transfers faster (or
-slower!). Read the man page for the setsockopt() system call for
+slower!). Read the man page for the code(setsockopt()) system call for
 details on some of the options you may be able to set. By default no
-special socket options are set.
+special socket options are set.  These settings are superseded by the
+bf(--sockopts) command-line option.
 
 enddit()
 
@@ -156,7 +154,7 @@ The default for "use chroot" is true.
 
 In order to preserve usernames and groupnames, rsync needs to be able to
 use the standard library functions for looking up names and IDs (i.e.
-getpwuid(), getgrgid(), getpwname(), and getgrnam()).  This means a
+code(getpwuid()), code(getgrgid()), code(getpwname()), and code(getgrnam())).  This means a
 process in the chroot namespace will need to have access to the resources
 used by these library functions (traditionally /etc/passwd and
 /etc/group).  If these resources are not available, rsync will only be
@@ -166,7 +164,7 @@ specified.
 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
+being downloaded/uploaded by adding an exclude rule to the rsyncd.conf file
 (e.g. "exclude = /etc/**").  Note that having the exclusion affect uploads
 is a relatively new feature in rsync, so make sure your daemon is
 at least 2.6.3 to effect this.  Also note that it is safest to exclude a
@@ -265,6 +263,25 @@ only superficially equivalent to the client specifying the
 bf(--include-from) option with a equivalent file.
 See the "exclude" option above.
 
+dit(bf(incoming chmod)) This option allows you to specify a set of
+comma-separated chmod strings that will affect the permissions of all
+incoming files (files that are being received by the daemon).  These
+changes happen after all other permission calculations, and this will
+even override destination-default and/or existing permissions when the
+client 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 option allows you to specify a set of
+comma-separated chmod strings that will affect the permissions of all
+outgoing files (files that are being sent out from the daemon).  These
+changes happen first, making the sent permissions appear to be different
+than those stored in the filesystem itself.  For instance, you could
+disable group write permissions on the server while having it appear to
+be 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)) The "auth users" option specifies a comma and
 space-separated list of usernames that will be allowed to connect to
 this module. The usernames do not need to exist on the local
@@ -272,12 +289,12 @@ system. The usernames may also contain shell wildcard characters. If
 "auth users" is set then the client will be challenged to supply a
 username and password to connect to the module. A challenge response
 authentication protocol is used for this exchange. The plain text
-usernames are passwords are stored in the file specified by the
+usernames and passwords are stored in the file specified by the
 "secrets file" option. The default is for all users to be able to
 connect without a password (this is called "anonymous rsync").
 
 See also the "CONNECTING TO AN RSYNC DAEMON OVER A REMOTE SHELL
-PROGRAM" section in rsync(1) for information on how handle an
+PROGRAM" section in bf(rsync)(1) for information on how handle an
 rsyncd.conf-level username that differs from the remote-shell-level
 username when using a remote shell to connect to an rsync daemon.
 
@@ -389,24 +406,25 @@ rsyncstats.)
 The single-character escapes that are understood are as follows:
 
 quote(itemize(
-  it() %h for the remote host name
-  it() %a for the remote IP address
-  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 " => 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
-  it() %u for the authenticated username (or the null string)
-  it() %b for the number of bytes actually transferred 
-  it() %c when sending files this gives the number of checksum bytes
-    received for this file
+  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 checksum bytes received for this 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 the
@@ -457,16 +475,45 @@ of the patterns will not be compressed during transfer.
 
 The default setting is tt(*.gz *.tgz *.zip *.z *.rpm *.deb *.iso *.bz2 *.tbz)
 
+dit(bf(pre-xfer exec), bf(post-xfer exec)) You may specify a command to be run
+before and/or after the transfer.  If the bf(pre-xfer exec) command fails, the
+transfer is aborted before it begins.
+
+The following environment variables will be set, though some are
+specific to the pre-xfer or the post-xfer environment:
+
+quote(itemize(
+  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_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) rsync's exit value.  This will be 0 for a
+  successful run, a positive value for an error that rsync returned
+  (e.g. 23=partial xfer), or a -1 if rsync failed to exit properly.
+  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, they
+are run using the permissions of the user that started the daemon (not the
+module's uid/gid setting) without any chroot restrictions.
+
 enddit()
 
 manpagesection(AUTHENTICATION STRENGTH)
 
 The authentication protocol used in rsync is a 128 bit MD4 based
-challenge response system. Although I believe that no one has ever
-demonstrated a brute-force break of this sort of system you should
-realize that this is not a "military strength" authentication system.
-It should be good enough for most purposes but if you want really top
-quality security then I recommend that you run rsync over ssh.
+challenge response system. This is fairly weak protection, though (with
+at least one brute-force hash-finding algorithm publicly available), so
+if you want really top-quality security, then I recommend that you run
+rsync over ssh.  (Yes, a future version of rsync will switch over to a
+stronger hashing method.)
 
 Also note that the rsync daemon protocol does not currently provide any
 encryption of the data that is transferred over the connection. Only
@@ -476,32 +523,6 @@ encryption.
 Future versions of rsync may support SSL for better authentication and
 encryption, but that is still being investigated.
 
-manpagesection(RUNNING AN RSYNC DAEMON OVER A REMOTE SHELL PROGRAM)
-
-If rsync is run with both the bf(--daemon) and bf(--rsh) (bf(-e)) options, it will
-spawn an rsync daemon using a remote shell connection.  Several
-configuration options will not be available unless the remote user is
-root (e.g. chroot, setuid/setgid, etc.).  There is no need to configure
-inetd or the services map to include the rsync daemon port if you run an
-rsync daemon only via a remote shell program.
-
-ADVANCED: To run an rsync daemon out of a single-use ssh key, use the
-"command=em(COMMAND)" syntax in the remote user's authorized_keys entry,
-where command would be
-
-quote(tt(rsync --server --daemon .))
-
-NOTE: rsync's argument parsing expects the trailing ".", so make sure
-that it's there.  If you want to use an rsyncd.conf(5)-style
-configuration file other than the default, you can added a
-bf(--config) option to the em(command):
-
-quote(tt(rsync --server --daemon --config=em(file) .))
-
-Note that the "--server" here is the internal option that rsync uses to
-run the remote version of rsync that it communicates with, and thus you
-should not be using the bf(--server) option under normal circumstances.
-
 manpagesection(EXAMPLES)
 
 A simple rsyncd.conf file that allow anonymous rsync to a ftp area at
@@ -570,7 +591,7 @@ url(http://rsync.samba.org/)(http://rsync.samba.org/)
 
 manpagesection(VERSION)
 
-This man page is current for version 2.6.6pre1 of rsync.
+This man page is current for version 2.6.8 of rsync.
 
 manpagesection(CREDITS)