ncftpput -y fixes to work with ProFTPd
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ncftp (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
The UTIME ftp extension used by the -y option has, unfortunately, different syntax on various servers. This bug report offers two alternative changes which would make ncftpput -y work with the ProFTPd server (at least as that server is implemented at the web hosting service cixx6.com).
ncftpput -y sends (atime,mtime,ctime) in UTIME ommand with 3 timestamps, for example:
SITE UTIME foo.txt 20111012224744 20110209090100 20111012224738 UTC
However there are two problems which prevent this from working:
1. The ProFTPd server uses the -first- timestamp to set the file mod-time. This is probably just a bug.
2. The atime sent as the 1st timestamp is wrong, which prevents working around the server bug by first setting all files' last-access times to match their modification times.
Apparently ncftpput stats the file after opening it, and so the access-time it gets is always the current time. Ideally, it would stat the file before opening it and save the timestamps, and then reset the timestamps after uploading the file (maybe only with -y). This would allow working around the server bug in the manner described previously.
However, I think a better solution would be to just send the file modification-time in all three positions. This would prevent actually preserving the access or status-change timestamps, but would make ncftpput "just work" with broken servers such as ProFTPd.
ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: ncftp 2:3.2.4-1
ProcVersionSign
Uname: Linux 2.6.35-30-generic x86_64
Architecture: amd64
Date: Wed Oct 12 15:48:40 2011
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release Candidate amd64 (20100928)
ProcEnviron:
PATH=(custom, user)
LANG=en_US.utf8
SHELL=/bin/bash
SourcePackage: ncftp
Status changed to 'Confirmed' because the bug affects multiple users.