sftp errors after rev 740 change
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Duplicity |
Fix Released
|
Medium
|
Unassigned | ||
Debian |
Fix Released
|
Unknown
|
Bug Description
I'm currently experiencing problems in the form of :
# duplicity -v 9 cleanup --force --allow-
...
Running 'sftp -oServerAliveIn
State = sftp, Before = 'Connected to sheeva.'
sftp command: 'mkdir ""'
State = sftp, Before = 'mkdir ""
Couldn't create directory: Failure'
sftp command: 'cd ""'
State = sftp, Before = 'cd ""'
sftp command: 'mkdir "mnt"'
State = sftp, Before = 'mkdir "mnt"
Couldn't create directory:'
Invalid SSH password
Running 'sftp -oServerAliveIn
It seems that the change introduced in rev 740 introduces the following variables to be defined :
remote_dir: /mnt/testbackup
dirs: ['', 'mnt', 'testbackups', 'asustour_slash']
When connecting manually with sftp (passphrase less ssh key + scponly on target), I get logged in in /var/backup, so obviously, mkdir "" and mkdir "mnt" there aren't the desired behaviour.
I suggest to change the code to something like :
def list(self):
"""
List files available for scp
Note that this command can get confused when dealing with
files with newlines in them, as the embedded newlines cannot
be distinguished from the file boundaries.
"""
print 'remote_dir:', self.remote_dir
dirs = self.remote_
print 'dirs:', dirs
if len(dirs) > 0:
if not dirs[0] :
print 'dirs:', dirs
for d in dirs:
commands = mkdir_commands + ["ls -1"]
commandline = ("%s %s %s" % (globals.
l = self.run_
return filter(lambda x: x, map(string.strip, l))
Changed in debian: | |
status: | Unknown → Confirmed |
Changed in duplicity: | |
milestone: | none → 0.6.15 |
importance: | Undecided → Medium |
status: | New → Fix Committed |
Changed in duplicity: | |
status: | Fix Committed → Fix Released |
Changed in debian: | |
status: | Confirmed → Fix Released |
Here's a proposed patch