-
Notifications
You must be signed in to change notification settings - Fork 71
Open
Labels
Description
I have restricted the commands SSH users can run to only rrsync using the command options in the SSH authorized_keys file. With rrsync I can allow access to only a certain directory (and optionally provide read-only access) and block shell access.
With this setup linux-timemachine fails:
timemachine user@server:/rsynctest ~/rsynctest/ -- --verbose
/usr/bin/rrsync: SSH_ORIGINAL_COMMAND='test -d /rsynctest' is not rsync
I have commented out these lines:
Lines 371 to 375 in 2fe23f3
| if ! dir_exists "${1}"; then | |
| logerr "Source directory does not exist: ${1}" | |
| logerr "See -h for help." | |
| exit 1 | |
| fi |
Now the backup seems to complete successfully.
Would it be possible to not use test -d in this case? Perhaps the rsync command itself could be used to check if the source directory exists? Else if skipping this test doesn't cause issues, perhaps a new cli flag could be added?