Document the new "incoming chmod" config option.
[rsync/rsync.git] / rsyncd.conf.yo
index d389d8a..a5152fd 100644 (file)
@@ -1,5 +1,5 @@
 mailto(rsync-bugs@samba.org)
-manpage(rsyncd.conf)(5)(19 May 2005)()()
+manpage(rsyncd.conf)(5)(28 Jul 2005)()()
 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:
 
@@ -119,7 +116,8 @@ 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
 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()
 
@@ -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,13 @@ 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 chmod string
+that will affect the permissions of all incoming files (files that are
+being copied to the daemon).  These changes happen last, giving you the
+final word on what the permissions should look like in the repository.  See
+the description of the bf(--chmod) rsync option and the bf(chmod) 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,7 +277,7 @@ 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").
 
@@ -457,16 +462,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 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 +510,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 +578,7 @@ url(http://rsync.samba.org/)(http://rsync.samba.org/)
 
 manpagesection(VERSION)
 
-This man page is current for version 2.6.5pre2 of rsync.
+This man page is current for version 2.6.6 of rsync.
 
 manpagesection(CREDITS)