PUT fails with any file over 1440 bytes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
curlftpfs (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Ubuntu 16.04.04
curlftpfs 0.9.2 libcurl/7.47.0 fuse/2.9
curlftpfs:
Installed: 0.9.2-9
Candidate: 0.9.2-9
Version table:
*** 0.9.2-9 500
500 http://
100 /var/lib/
Running on AWS EC2
Connecting to Filezilla Server on Windows.
PUT a file of 1440 Bytes or less no problems, 1 byte more or above results in a 0 byte file.
Tested on 2 separate 16.04 EC2 instances.
Same test on an Ubuntu 14.04:
curlftpfs 0.9.2 libcurl/7.35.0 fuse/2.9
and it works no problem, possibly pointing the finger towards libcurl?
Note: I have tested this transferring to PureFTP server and got a success. But transferring to Filezilla server failed. Apologies if this means the issue is there. Although manual transfers from other machines to the same Filezilla server instance both Passive and Active work. As do transfers from the 14.04 LTS implementation as mentioned above.
In order to reproduce this, setup a basic Filezilla server instance, In my instance on a basic Windows 7 machine using version 0.9.60.2. Make sure firewall ports are open on the Windows machine or the Firewall is temporarily off and any required ports are forwarded from the router. On the Ubuntu 16.04 instance create a folder, 'mkdir ftp' and mount that folder using curlftpfs:
curlftpfs -o allow_other user:password@
create a test 1440 byte file, in my case that's 288 lines of the word test saved as max.txt. Create with:
for ((i=1;i<=288;i++)) ; do echo "test"; done > max.txt
copy that test file into the mounted ftp folder: 'cp max.txt ftp/'
This should work.
Add an extra character to the file so it is now 1441 Bytes and try the copy again. This should fail and has on 2 separate machines for me.
If you want to mount the share with debug output, then mount in another Terminal window with:
curlftpfs -o allow_other,debug user:password@
(if its already mounted you will need to unmount it first with 'umount ./ftp')
My first bug report here after spending a day playing with many options to get this to run, apologies if this is actually a libcurl bug as opposed to curlftpfs.
Further information that may point to this is I have also suffered the same failures using manual FTP commands over SSH from the same 16.04 instance and also an attempt at using kermit, hoping it would bypass any broken libraries.
DEBUG EXAMPLE OF A FAIL:
FUSE library version: 2.9.4
nullpath_ok: 0
nopath: 0
utime_omit_ok: 0
unique: 1, opcode: INIT (26), nodeid: 0, insize: 56, pid: 0
INIT: 7.23
flags=0x0003fffb
max_readahead=
INIT: 7.19
flags=0x00000011
max_
max_
max_background=0
congestion_
unique: 1, success, outsize: 40
unique: 2, opcode: GETATTR (3), nodeid: 1, insize: 56, pid: 9672
getattr /
unique: 2, success, outsize: 120
unique: 3, opcode: LOOKUP (1), nodeid: 1, insize: 49, pid: 9672
LOOKUP /max1.txt
getattr /max1.txt
ftpfs: operation ftpfs_getattr failed because No such file or directory
unique: 3, error: -2 (No such file or directory), outsize: 16
unique: 4, opcode: LOOKUP (1), nodeid: 1, insize: 49, pid: 9672
LOOKUP /max1.txt
getattr /max1.txt
unique: 4, error: -2 (No such file or directory), outsize: 16
unique: 5, opcode: CREATE (35), nodeid: 1, insize: 65, pid: 9672
create flags: 0x80c1 /max1.txt 0100644 umask=0022
ftpfs: operation ftpfs_getattr failed because No such file or directory
ftpfs: operation ftpfs_chmod failed because Operation not permitted
create[
getattr /max1.txt
NODEID: 2
unique: 5, success, outsize: 160
unique: 6, opcode: GETXATTR (22), nodeid: 2, insize: 68, pid: 9672
unique: 6, error: -38 (Function not implemented), outsize: 16
unique: 7, opcode: WRITE (16), nodeid: 2, insize: 1521, pid: 9672
write[140707423
write[
unique: 7, success, outsize: 24
unique: 8, opcode: FLUSH (25), nodeid: 2, insize: 64, pid: 9672
flush[140707423
ftpfs: operation ftpfs_flush failed because Input/output error
unique: 8, error: -5 (Input/output error), outsize: 16
unique: 9, opcode: RELEASE (18), nodeid: 2, insize: 64, pid: 0
release[
unique: 9, success, outsize: 16
DEBUG EXAMPLE OF SUCCESS - ONE CHARACTER LESS IN THE SAME FILE:
FUSE library version: 2.9.4
nullpath_ok: 0
nopath: 0
utime_omit_ok: 0
unique: 1, opcode: INIT (26), nodeid: 0, insize: 56, pid: 0
INIT: 7.23
flags=0x0003fffb
max_readahead=
INIT: 7.19
flags=0x00000011
max_
max_
max_background=0
congestion_
unique: 1, success, outsize: 40
unique: 2, opcode: GETATTR (3), nodeid: 1, insize: 56, pid: 9793
getattr /
unique: 2, success, outsize: 120
unique: 3, opcode: LOOKUP (1), nodeid: 1, insize: 49, pid: 9793
LOOKUP /max1.txt
getattr /max1.txt
NODEID: 2
unique: 3, success, outsize: 144
unique: 4, opcode: OPEN (14), nodeid: 2, insize: 48, pid: 9793
open flags: 0x8001 /max1.txt
open[
unique: 4, success, outsize: 32
unique: 5, opcode: GETXATTR (22), nodeid: 2, insize: 68, pid: 9793
unique: 5, error: -38 (Function not implemented), outsize: 16
unique: 6, opcode: SETATTR (4), nodeid: 2, insize: 128, pid: 9793
truncate /max1.txt 0
getattr /max1.txt
unique: 6, success, outsize: 120
unique: 7, opcode: WRITE (16), nodeid: 2, insize: 1520, pid: 9793
write[140650783
write[
unique: 7, success, outsize: 24
unique: 8, opcode: FLUSH (25), nodeid: 2, insize: 64, pid: 9793
flush[140650783
unique: 8, success, outsize: 16
unique: 9, opcode: RELEASE (18), nodeid: 2, insize: 64, pid: 0
release[
unique: 9, success, outsize: 16
description: | updated |
description: | updated |
description: | updated |
description: | updated |