samba-bugs@samba.org
2009-Mar-16 21:08 UTC
DO NOT REPLY [Bug 6191] New: rsyncd path does not support environmental variables
https://bugzilla.samba.org/show_bug.cgi?id=6191 Summary: rsyncd path does not support environmental variables Product: rsync Version: 2.6.9 Platform: x86 OS/Version: Linux Status: NEW Severity: normal Priority: P3 Component: core AssignedTo: wayned@samba.org ReportedBy: jerome@6251100.com QAContact: rsync-qa@samba.org I need to have a module that saves the files to ~/backup, and the rsync complains that the path does not exist for ~/backup, $HOME/backup, and for /home/$USER/backup. The error is chdir failed, no such directory. -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug, or are watching the QA contact.
samba-bugs@samba.org
2009-Mar-16 22:23 UTC
DO NOT REPLY [Bug 6191] rsyncd path does not support environmental variables
https://bugzilla.samba.org/show_bug.cgi?id=6191 matt@mattmccutchen.net changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |enhancement ------- Comment #1 from matt@mattmccutchen.net 2009-03-16 17:23 CST ------- Indeed, environment variables are not recognized in the module path; that would be an enhancement. This is being discussed on the list: http://lists.samba.org/archive/rsync/2009-March/022903.html -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug, or are watching the QA contact.
samba-bugs at samba.org
2009-Oct-21 03:32 UTC
DO NOT REPLY [Bug 6191] rsyncd path does not support environmental variables
https://bugzilla.samba.org/show_bug.cgi?id=6191 wayned at samba.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #2 from wayned at samba.org 2009-10-20 22:32 CST ------- The git repository now supports the expansion of environment variables using %VAR% references. I chose this idiom because I thought it would be less likely to have backward-compatibility issues, and it also stays with the DOS/Win style of the config file. You can reference environment variables in the values of settings only, which does not include module names or parameter names. All string values are evaluated late so that they can include the variables listed in the manpage section describing the pre-xfer exec scripts. Values that are not strings (such as "use chroot = BOOL") are expanded at config-reading time so that the parameter can be set with the appropriate value type. So, to get the authenticating user into a path as you requested (and indeed, even into a uid setting) you can do things like this: [per-user-module] path = /home/%RSYNC_USER_NAME% uid = %RSYNC_USER_NAME% gid = * auth users = sally susan sam steve One thing you can't do is this: secrets file = /home/%RSYNC_USER_NAME%/.rsync-secret That's because the needed environment variable isn't set until after the name and password has been validated. -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug, or are watching the QA contact.
Possibly Parallel Threads
- DO NOT REPLY [Bug 4263] New: Symlinks gets corruped when rsyncd is used to 'put' the symlink.
- DO NOT REPLY [Bug 4757] New: Daemon mis-logs paths if module path in rsyncd.conf is relative
- DO NOT REPLY [Bug 7510] New: rsyncd.conf: Default path=/ is dangerous
- DO NOT REPLY [Bug 5792] New: rsync fails to log files "sent" with options: --itemize-changes -n --log-file
- DO NOT REPLY [Bug 5275] New: user id mapping stopped working with 3.0.0pre10