char *comment;
char *lock_file;
BOOL read_only;
+ BOOL write_only;
BOOL list;
BOOL use_chroot;
BOOL transfer_logging;
NULL, /* comment */
DEFAULT_LOCK_FILE, /* lock file */
True, /* read only */
+ False, /* write only */
True, /* list */
True, /* use chroot */
False, /* transfer logging */
{"lock file", P_STRING, P_LOCAL, &sDefault.lock_file, NULL, 0},
{"path", P_PATH, P_LOCAL, &sDefault.path, NULL, 0},
{"read only", P_BOOL, P_LOCAL, &sDefault.read_only, NULL, 0},
+ {"write only", P_BOOL, P_LOCAL, &sDefault.write_only, NULL, 0},
{"list", P_BOOL, P_LOCAL, &sDefault.list, NULL, 0},
{"use chroot", P_BOOL, P_LOCAL, &sDefault.use_chroot, NULL, 0},
{"ignore nonreadable",P_BOOL, P_LOCAL, &sDefault.ignore_nonreadable, NULL, 0},
FN_LOCAL_STRING(lp_path, path)
FN_LOCAL_STRING(lp_lock_file, lock_file)
FN_LOCAL_BOOL(lp_read_only, read_only)
+FN_LOCAL_BOOL(lp_write_only, write_only)
FN_LOCAL_BOOL(lp_list, list)
FN_LOCAL_BOOL(lp_use_chroot, use_chroot)
FN_LOCAL_BOOL(lp_transfer_logging, transfer_logging)
(long)getpid());
}
+ if (am_daemon && lp_write_only(module_id) && am_sender) {
+ rprintf(FERROR, "ERROR: module is write only\n");
+ exit_cleanup(RERR_SYNTAX);
+ return;
+ }
+
if (!relative_paths && !push_dir(dir)) {
rsyserr(FERROR, errno, "push_dir#3 %s failed",
full_fname(dir));
be possible if file permissions on the server allow them. The default
is for all modules to be read only.
+dit(bf(write only)) The "write only" option determines whether clients
+will be able to download files or not. If "write only" is true then any
+attempted downloads will fail. If "write only" is false then downloads
+will be possible if file permissions on the server allow them. The
+default is for this option to be disabled.
+
dit(bf(list)) The "list" option determines if this module should be
listed when the client asks for a listing of available modules. By
setting this to false you can create hidden modules. The default is