"bzr push" fails with vsftpd
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Medium
|
Unassigned |
Bug Description
bzr 0.18
Transport: FTP
Server: vsFTPd 2.0.3
I'm able to branch/checkout from a certain FTP server, but any write operation (push, init, merge, ...) to that FTP server fails with an error message like this:
bzr: ERROR: Generic path error: '/test/
Log:
FTP put: /test/.
unable to understand error for path: /test/.
Traceback (most recent call last):
File "/usr/lib/
return run_bzr(argv)
File "/usr/lib/
ret = run(*run_argv)
File "/usr/lib/
return self.run(
File "/usr/lib/
push_result = br_from.push(br_to, overwrite)
File "/usr/lib/
return unbound(self, *args, **kwargs)
File "/usr/lib/
target.
File "/usr/lib/
repo_token = self.repository
File "/usr/lib/
return self.control_
File "/usr/lib/
token_from_lock = self._lock.
File "/usr/lib/
return self.wait_lock()
File "/usr/lib/
return self.attempt_lock()
File "/usr/lib/
return self._attempt_
File "/usr/lib/
tmpname = self._create_
File "/usr/lib/
info_bytes)
File "/usr/lib/
dir_
File "/usr/lib/
return self.put_
File "/usr/lib/
self.
File "/usr/lib/
unlink_
File "/usr/lib/
rename_
File "/usr/lib/
rename_
File "/usr/lib/
': unable to rename to %r' % (abs_to))
File "/usr/lib/
raise unknown_exc(path, extra=extra)
FtpPathError: Generic path error: '/test/
return code 3
In order to see what's going on I monitored the connection with Wireshark. What happens is that bzr stores a file under a temporary name, then tries to rename the file using its final name (I suspect this is intended because of concurrency reasons) and finally fails to interpret the error message correctly:
C: STOR /test/.
S: 150 Ok to send data.
S: 226 File receive OK.
-------
C: RNFR /test/.
S: 550 RNFR command failed.
On another FTP server, write operations work perfectly because that server returns a different error message for the first RNFR (ReName FRom) with the "wrong" file name:
C: STOR /bzr/test/
S: 150 Opening BINARY mode data connection for /bzr/test/
S: 226 Transfer complete.
-------
C: RNFR /bzr/test/
S: 550 /bzr/test/
-------
C: RNFR /bzr/test/
S: 350 File or directory exists, ready for destination name.
C: RNTO /bzr/test/
S: 250 Rename successful
C: RNFR /bzr/test/
S: 350 File or directory exists, ready for destination name.
C: RNTO /bzr/test/
S: 250 Rename successful
As can be seen in the vsFTPd source code (ftp://vsftpd.
Related branches
Changed in bzr: | |
importance: | Undecided → Medium |
status: | New → Triaged |
Changed in bzr: | |
status: | Fix Committed → Fix Released |
milestone: | none → 1.4rc1 |
Changed in bzr: | |
milestone: | 1.4rc1 → 1.4 |
This patch against bzr.dev (works also for 0.18) should fix this bug by translating the vsFTPd specific error message to the correct exception