Comments (12)
@WoolenWang, Thank you for opening this issue. It is my intent that ftpd work on Windows if at all practical. However, since I have only a Linux system to develop and test with, it is likely that I have accidentally used functions which do not work in Windows. But I don't know.
Have you tried ftpd on Windows and found it did or did not work? If it did not work, specific bug reports (stack traces, etc.) would be very helpful, and patches from a developer with access to Windows would be most welcome.
from ftpd.
@wconrad i just ran the tests on a win 8 x86 machine with ruby 1.9.3p448 [i386-mingw32] (installed via windows ruby installer).
apparently most of the problems stem from the lack of symlinks on windows filesystems. I'll have an eye on this.
Here is the output :
...................FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF.......................................................................FFFFFFFFF....................
Failures:
1) Ftpd::DiskFileSystem#accessible? (within tree)
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
2) Ftpd::DiskFileSystem#accessible? (outside tree)
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
3) Ftpd::DiskFileSystem#exists? (exists)
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
4) Ftpd::DiskFileSystem#exists? (does not exist)
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
5) Ftpd::DiskFileSystem#directory? (directory)
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
6) Ftpd::DiskFileSystem#directory? (file)
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
7) Ftpd::DiskFileSystem#delete (success)
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
8) Ftpd::DiskFileSystem#delete (error)
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
9) Ftpd::DiskFileSystem#read (success)
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
10) Ftpd::DiskFileSystem#read (error)
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
11) Ftpd::DiskFileSystem#write (success)
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
12) Ftpd::DiskFileSystem#write (error)
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
13) Ftpd::DiskFileSystem#append (destination missing)
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
14) Ftpd::DiskFileSystem#append (destination exists)
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
15) Ftpd::DiskFileSystem#append (error)
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
16) Ftpd::DiskFileSystem#mkdir (success)
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
17) Ftpd::DiskFileSystem#mkdir (error)
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
18) Ftpd::DiskFileSystem#rename (success)
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
19) Ftpd::DiskFileSystem#rename (error)
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
20) Ftpd::DiskFileSystem#file_info (file) behaves like file info ftype
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
Shared Example Group: "file info" called from ./spec/disk_file_system_spec.rb:262
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
21) Ftpd::DiskFileSystem#file_info (file) behaves like file info group
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
Shared Example Group: "file info" called from ./spec/disk_file_system_spec.rb:262
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
22) Ftpd::DiskFileSystem#file_info (file) behaves like file info mode
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
Shared Example Group: "file info" called from ./spec/disk_file_system_spec.rb:262
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
23) Ftpd::DiskFileSystem#file_info (file) behaves like file info mtime
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
Shared Example Group: "file info" called from ./spec/disk_file_system_spec.rb:262
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
24) Ftpd::DiskFileSystem#file_info (file) behaves like file info nlink
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
Shared Example Group: "file info" called from ./spec/disk_file_system_spec.rb:262
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
25) Ftpd::DiskFileSystem#file_info (file) behaves like file info owner
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
Shared Example Group: "file info" called from ./spec/disk_file_system_spec.rb:262
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
26) Ftpd::DiskFileSystem#file_info (file) behaves like file info size
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
Shared Example Group: "file info" called from ./spec/disk_file_system_spec.rb:262
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
27) Ftpd::DiskFileSystem#file_info (file) behaves like file info path
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
Shared Example Group: "file info" called from ./spec/disk_file_system_spec.rb:262
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
28) Ftpd::DiskFileSystem#file_info (file) behaves like file info identifier
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
Shared Example Group: "file info" called from ./spec/disk_file_system_spec.rb:262
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
29) Ftpd::DiskFileSystem#file_info (symlink) behaves like file info ftype
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
Shared Example Group: "file info" called from ./spec/disk_file_system_spec.rb:267
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
30) Ftpd::DiskFileSystem#file_info (symlink) behaves like file info group
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
Shared Example Group: "file info" called from ./spec/disk_file_system_spec.rb:267
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
31) Ftpd::DiskFileSystem#file_info (symlink) behaves like file info mode
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
Shared Example Group: "file info" called from ./spec/disk_file_system_spec.rb:267
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
32) Ftpd::DiskFileSystem#file_info (symlink) behaves like file info mtime
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
Shared Example Group: "file info" called from ./spec/disk_file_system_spec.rb:267
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
33) Ftpd::DiskFileSystem#file_info (symlink) behaves like file info nlink
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
Shared Example Group: "file info" called from ./spec/disk_file_system_spec.rb:267
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
34) Ftpd::DiskFileSystem#file_info (symlink) behaves like file info owner
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
Shared Example Group: "file info" called from ./spec/disk_file_system_spec.rb:267
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
35) Ftpd::DiskFileSystem#file_info (symlink) behaves like file info size
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
Shared Example Group: "file info" called from ./spec/disk_file_system_spec.rb:267
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
36) Ftpd::DiskFileSystem#file_info (symlink) behaves like file info path
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
Shared Example Group: "file info" called from ./spec/disk_file_system_spec.rb:267
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
37) Ftpd::DiskFileSystem#file_info (symlink) behaves like file info identifier
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
Shared Example Group: "file info" called from ./spec/disk_file_system_spec.rb:267
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
38) Ftpd::DiskFileSystem#dir (no such file)
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
39) Ftpd::DiskFileSystem#dir (file)
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
40) Ftpd::DiskFileSystem#dir (directory)
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
41) Ftpd::DiskFileSystem#dir (directory)
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
42) Ftpd::DiskFileSystem#dir (directory + wildcard)
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
43) Ftpd::DiskFileSystem#dir (directory + wildcard)
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
44) Ftpd::DiskFileSystem#dir (wildcard)
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
45) Ftpd::DiskFileSystem#dir (wildcard)
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
46) Ftpd::DiskFileSystem#dir (wildcard)
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
47) Ftpd::DiskFileSystem#dir (no such directory)
Failure/Error: FileUtils.ln_s data_path(target_path), data_path(symlink_path)
NotImplementedError:
symlink() function is unimplemented on this machine
# ./spec/disk_file_system_spec.rb:47:in `add_symlink'
# ./spec/disk_file_system_spec.rb:56:in `block (2 levels) in <module:Ftpd>'
48) Ftpd::Protocols IPV6 server, IPV6 connection should not support IPV4
Failure/Error: expect(protocols.supports_protocol?(Protocols::IPV4)).to be_false
NameError:
uninitialized constant Socket::IPV6_V6ONLY
# ./lib/ftpd/protocols.rb:54:in `ipv6_dual_stack?'
# ./lib/ftpd/protocols.rb:45:in `supports_ipv4?'
# ./lib/ftpd/protocols.rb:37:in `protocol_codes'
# ./lib/ftpd/protocols.rb:28:in `supports_protocol?'
# ./spec/protocols_spec.rb:71:in `block (3 levels) in <module:Ftpd>'
49) Ftpd::Protocols IPV6 server, IPV6 connection should support IPV6
Failure/Error: expect(protocols.supports_protocol?(Protocols::IPV6)).to be_true
NameError:
uninitialized constant Socket::IPV6_V6ONLY
# ./lib/ftpd/protocols.rb:54:in `ipv6_dual_stack?'
# ./lib/ftpd/protocols.rb:45:in `supports_ipv4?'
# ./lib/ftpd/protocols.rb:37:in `protocol_codes'
# ./lib/ftpd/protocols.rb:28:in `supports_protocol?'
# ./spec/protocols_spec.rb:75:in `block (3 levels) in <module:Ftpd>'
50) Ftpd::Protocols IPV6 server, IPV6 connection should list the supported protocols
Failure/Error: expect(protocols.protocol_codes).to eq [
NameError:
uninitialized constant Socket::IPV6_V6ONLY
# ./lib/ftpd/protocols.rb:54:in `ipv6_dual_stack?'
# ./lib/ftpd/protocols.rb:45:in `supports_ipv4?'
# ./lib/ftpd/protocols.rb:37:in `protocol_codes'
# ./spec/protocols_spec.rb:79:in `block (3 levels) in <module:Ftpd>'
51) Ftpd::Protocols wildcard server, IPV4 connection should support IPV4
Failure/Error: client_socket = TCPSocket.new(connect_address, port)
Errno::ECONNREFUSED:
Aucune connexion n’a pu être établie car l’ordinateur cible l’a expressément refusée. - connect(2)
# ./spec/protocols_spec.rb:30:in `initialize'
# ./spec/protocols_spec.rb:30:in `new'
# ./spec/protocols_spec.rb:30:in `initialize'
# ./spec/protocols_spec.rb:91:in `new'
# ./spec/protocols_spec.rb:91:in `block (3 levels) in <module:Ftpd>'
# ./spec/protocols_spec.rb:93:in `block (3 levels) in <module:Ftpd>'
# ./spec/protocols_spec.rb:96:in `block (3 levels) in <module:Ftpd>'
52) Ftpd::Protocols wildcard server, IPV4 connection should support IPV6
Failure/Error: client_socket = TCPSocket.new(connect_address, port)
Errno::ECONNREFUSED:
Aucune connexion n’a pu être établie car l’ordinateur cible l’a expressément refusée. - connect(2)
# ./spec/protocols_spec.rb:30:in `initialize'
# ./spec/protocols_spec.rb:30:in `new'
# ./spec/protocols_spec.rb:30:in `initialize'
# ./spec/protocols_spec.rb:91:in `new'
# ./spec/protocols_spec.rb:91:in `block (3 levels) in <module:Ftpd>'
# ./spec/protocols_spec.rb:93:in `block (3 levels) in <module:Ftpd>'
# ./spec/protocols_spec.rb:100:in `block (3 levels) in <module:Ftpd>'
53) Ftpd::Protocols wildcard server, IPV4 connection should list the supported protocols
Failure/Error: client_socket = TCPSocket.new(connect_address, port)
Errno::ECONNREFUSED:
Aucune connexion n’a pu être établie car l’ordinateur cible l’a expressément refusée. - connect(2)
# ./spec/protocols_spec.rb:30:in `initialize'
# ./spec/protocols_spec.rb:30:in `new'
# ./spec/protocols_spec.rb:30:in `initialize'
# ./spec/protocols_spec.rb:91:in `new'
# ./spec/protocols_spec.rb:91:in `block (3 levels) in <module:Ftpd>'
# ./spec/protocols_spec.rb:93:in `block (3 levels) in <module:Ftpd>'
# ./spec/protocols_spec.rb:104:in `block (3 levels) in <module:Ftpd>'
54) Ftpd::Protocols wildcard server, IPV6 connection should support IPV4
Failure/Error: expect(protocols.supports_protocol?(Protocols::IPV4)).to be_true
NameError:
uninitialized constant Socket::IPV6_V6ONLY
# ./lib/ftpd/protocols.rb:54:in `ipv6_dual_stack?'
# ./lib/ftpd/protocols.rb:45:in `supports_ipv4?'
# ./lib/ftpd/protocols.rb:37:in `protocol_codes'
# ./lib/ftpd/protocols.rb:28:in `supports_protocol?'
# ./spec/protocols_spec.rb:122:in `block (3 levels) in <module:Ftpd>'
55) Ftpd::Protocols wildcard server, IPV6 connection should support IPV6
Failure/Error: expect(protocols.supports_protocol?(Protocols::IPV6)).to be_true
NameError:
uninitialized constant Socket::IPV6_V6ONLY
# ./lib/ftpd/protocols.rb:54:in `ipv6_dual_stack?'
# ./lib/ftpd/protocols.rb:45:in `supports_ipv4?'
# ./lib/ftpd/protocols.rb:37:in `protocol_codes'
# ./lib/ftpd/protocols.rb:28:in `supports_protocol?'
# ./spec/protocols_spec.rb:126:in `block (3 levels) in <module:Ftpd>'
56) Ftpd::Protocols wildcard server, IPV6 connection should list the supported protocols
Failure/Error: expect(protocols.protocol_codes).to eq [
NameError:
uninitialized constant Socket::IPV6_V6ONLY
# ./lib/ftpd/protocols.rb:54:in `ipv6_dual_stack?'
# ./lib/ftpd/protocols.rb:45:in `supports_ipv4?'
# ./lib/ftpd/protocols.rb:37:in `protocol_codes'
# ./spec/protocols_spec.rb:130:in `block (3 levels) in <module:Ftpd>'
Finished in 3.25 seconds
166 examples, 56 failures
Failed examples:
rspec ./spec/disk_file_system_spec.rb:62 # Ftpd::DiskFileSystem#accessible? (within tree)
rspec ./spec/disk_file_system_spec.rb:68 # Ftpd::DiskFileSystem#accessible? (outside tree)
rspec ./spec/disk_file_system_spec.rb:78 # Ftpd::DiskFileSystem#exists? (exists)
rspec ./spec/disk_file_system_spec.rb:84 # Ftpd::DiskFileSystem#exists? (does not exist)
rspec ./spec/disk_file_system_spec.rb:94 # Ftpd::DiskFileSystem#directory? (directory)
rspec ./spec/disk_file_system_spec.rb:100 # Ftpd::DiskFileSystem#directory? (file)
rspec ./spec/disk_file_system_spec.rb:110 # Ftpd::DiskFileSystem#delete (success)
rspec ./spec/disk_file_system_spec.rb:117 # Ftpd::DiskFileSystem#delete (error)
rspec ./spec/disk_file_system_spec.rb:130 # Ftpd::DiskFileSystem#read (success)
rspec ./spec/disk_file_system_spec.rb:136 # Ftpd::DiskFileSystem#read (error)
rspec ./spec/disk_file_system_spec.rb:151 # Ftpd::DiskFileSystem#write (success)
rspec ./spec/disk_file_system_spec.rb:158 # Ftpd::DiskFileSystem#write (error)
rspec ./spec/disk_file_system_spec.rb:173 # Ftpd::DiskFileSystem#append (destination missing)
rspec ./spec/disk_file_system_spec.rb:181 # Ftpd::DiskFileSystem#append (destination exists)
rspec ./spec/disk_file_system_spec.rb:188 # Ftpd::DiskFileSystem#append (error)
rspec ./spec/disk_file_system_spec.rb:201 # Ftpd::DiskFileSystem#mkdir (success)
rspec ./spec/disk_file_system_spec.rb:208 # Ftpd::DiskFileSystem#mkdir (error)
rspec ./spec/disk_file_system_spec.rb:223 # Ftpd::DiskFileSystem#rename (success)
rspec ./spec/disk_file_system_spec.rb:231 # Ftpd::DiskFileSystem#rename (error)
rspec ./spec/disk_file_system_spec.rb:249 # Ftpd::DiskFileSystem#file_info (file) behaves like file info ftype
rspec ./spec/disk_file_system_spec.rb:250 # Ftpd::DiskFileSystem#file_info (file) behaves like file info group
rspec ./spec/disk_file_system_spec.rb:251 # Ftpd::DiskFileSystem#file_info (file) behaves like file info mode
rspec ./spec/disk_file_system_spec.rb:252 # Ftpd::DiskFileSystem#file_info (file) behaves like file info mtime
rspec ./spec/disk_file_system_spec.rb:253 # Ftpd::DiskFileSystem#file_info (file) behaves like file info nlink
rspec ./spec/disk_file_system_spec.rb:254 # Ftpd::DiskFileSystem#file_info (file) behaves like file info owner
rspec ./spec/disk_file_system_spec.rb:255 # Ftpd::DiskFileSystem#file_info (file) behaves like file info size
rspec ./spec/disk_file_system_spec.rb:256 # Ftpd::DiskFileSystem#file_info (file) behaves like file info path
rspec ./spec/disk_file_system_spec.rb:257 # Ftpd::DiskFileSystem#file_info (file) behaves like file info identifier
rspec ./spec/disk_file_system_spec.rb:249 # Ftpd::DiskFileSystem#file_info (symlink) behaves like file info ftype
rspec ./spec/disk_file_system_spec.rb:250 # Ftpd::DiskFileSystem#file_info (symlink) behaves like file info group
rspec ./spec/disk_file_system_spec.rb:251 # Ftpd::DiskFileSystem#file_info (symlink) behaves like file info mode
rspec ./spec/disk_file_system_spec.rb:252 # Ftpd::DiskFileSystem#file_info (symlink) behaves like file info mtime
rspec ./spec/disk_file_system_spec.rb:253 # Ftpd::DiskFileSystem#file_info (symlink) behaves like file info nlink
rspec ./spec/disk_file_system_spec.rb:254 # Ftpd::DiskFileSystem#file_info (symlink) behaves like file info owner
rspec ./spec/disk_file_system_spec.rb:255 # Ftpd::DiskFileSystem#file_info (symlink) behaves like file info size
rspec ./spec/disk_file_system_spec.rb:256 # Ftpd::DiskFileSystem#file_info (symlink) behaves like file info path
rspec ./spec/disk_file_system_spec.rb:257 # Ftpd::DiskFileSystem#file_info (symlink) behaves like file info identifier
rspec ./spec/disk_file_system_spec.rb:280 # Ftpd::DiskFileSystem#dir (no such file)
rspec ./spec/disk_file_system_spec.rb:285 # Ftpd::DiskFileSystem#dir (file)
rspec ./spec/disk_file_system_spec.rb:290 # Ftpd::DiskFileSystem#dir (directory)
rspec ./spec/disk_file_system_spec.rb:291 # Ftpd::DiskFileSystem#dir (directory)
rspec ./spec/disk_file_system_spec.rb:296 # Ftpd::DiskFileSystem#dir (directory + wildcard)
rspec ./spec/disk_file_system_spec.rb:297 # Ftpd::DiskFileSystem#dir (directory + wildcard)
rspec ./spec/disk_file_system_spec.rb:302 # Ftpd::DiskFileSystem#dir (wildcard)
rspec ./spec/disk_file_system_spec.rb:303 # Ftpd::DiskFileSystem#dir (wildcard)
rspec ./spec/disk_file_system_spec.rb:304 # Ftpd::DiskFileSystem#dir (wildcard)
rspec ./spec/disk_file_system_spec.rb:309 # Ftpd::DiskFileSystem#dir (no such directory)
rspec ./spec/protocols_spec.rb:70 # Ftpd::Protocols IPV6 server, IPV6 connection should not support IPV4
rspec ./spec/protocols_spec.rb:74 # Ftpd::Protocols IPV6 server, IPV6 connection should support IPV6
rspec ./spec/protocols_spec.rb:78 # Ftpd::Protocols IPV6 server, IPV6 connection should list the supported protocols
rspec ./spec/protocols_spec.rb:95 # Ftpd::Protocols wildcard server, IPV4 connection should support IPV4
rspec ./spec/protocols_spec.rb:99 # Ftpd::Protocols wildcard server, IPV4 connection should support IPV6
rspec ./spec/protocols_spec.rb:103 # Ftpd::Protocols wildcard server, IPV4 connection should list the supported protocols
rspec ./spec/protocols_spec.rb:121 # Ftpd::Protocols wildcard server, IPV6 connection should support IPV4
rspec ./spec/protocols_spec.rb:125 # Ftpd::Protocols wildcard server, IPV6 connection should support IPV6
rspec ./spec/protocols_spec.rb:129 # Ftpd::Protocols wildcard server, IPV6 connection should list the supported protocols
C:/Ruby193/bin/ruby.exe -S rspec ./spec/command_sequence_checker_spec.rb ./spec/connection_throttle_spec.rb ./spec/connection_tracker_spec.rb ./spec/disk_file_system_spec.rb ./spec/exception_translator_spec.rb ./spec/file_info_spec.rb ./spec/file_system_error_translator_spec.rb ./spec/list_format/eplf_spec.rb ./spec/list_format/ls_spec.rb ./spec/list_path_spec.rb ./spec/null_logger_spec.rb ./spec/protocols_spec.rb ./spec/telnet_spec.rb ./spec/translate_exceptions_spec.rb
from ftpd.
@m0x - I'm excited to finally see what goes wrong in Windows. Thanks!
The good news about the symlink issue is that it's just the spec itself using symlinks -- it wants to make sure that a symlink is treated as the thing it links to (FTP servers don't expose symlinks--or, at least, ftpd doesn't expose symlinks). It might be as simple as recognizing that the test is running under Windows and not creating (or checking) the symlink under that condition.
Did the cucumber tests (run with "rake test:features") show failures as well?
from ftpd.
@wconrad the cucumber features show a lot of failures... bad news is, the tests seem to freeze my computer, too!
Could not get a decent output to show you because of this.
I'm also trying to run the basic example in the readme ; the script runs well but as of now I did not manage to connect to the server using Filezilla or whatever. Could be my network settings (I'm a poor network admin, especially on windows), but even with a disabled firewall it does not seem to work (connection is refused).
from ftpd.
Managed to get the example working.
For some reason, windows seems to allow localhost
but not 127.0.0.1
when attempting to connect. Duh.
At least, it allows Filezilla to do it... Using Net::FTP
i always get a "connection refused".
With Filezilla, the initial handshake seems to go pretty well, but no commands seem to really work. As you know, I'm not really familiar with the FTP protocol, so maybe this will make more sense to you (barely translated filezilla output) :
<< 220 wconrad/ftpd 0.9.0
=> USER anonymous
<< 331 Password required
=> PASS **************
<< 230 Logged in
Status server does not support non-ASCII characters
Status Connected
=> PWD
<< 257 "/" is current directory
=> TYPE I
<< 200 Type set to I
=> EPSV
<< 229 Entering extended passive mode (|||56096|)
=> LIST
<< 150 Opening BINARY mode data connection
<< 226 Transfer complete
Status Directory contents displayed with success
Status Starting to send C:\Users\Mox\Desktop\uXhAGto.gif
=> CWD /
<< 550 No such file or directory
=> MKD /
<< 550 No such file or directory
=> CWD /
<< 550 No such file or directory
=> SIZE /uXhAGto.gif
<< 500 Syntax error, command unrecognized: SIZE /uXhAGto.gif
=> MDTM /uXhAGto.gif
<< 500 Syntax error, command unrecognized: MDTM /uXhAGto.gif
=> EPSV
<< 229 Entering extended passive mode (|||56102|)
=> STOR /uXhAGto.gif
<< 550 No such file or directory
Error Critical error after transfering 726 638 octets in 1 second
from ftpd.
@m0x - OK, so getting windows working is going to involve some detective work. In any case, it is often a good strategy to fix the failing rspec tests first before worrying about the cucumber tests.
The specs that are failing with the missing Socket::IPV6_V6ONLY error are not surprising, now that I look at the code. That constant exists to support #getsockopt under *nix. #getsockopt is a cross-platform bugaboo.
It looks like the file system is failing under Windows. This:
=> CWD /
<< 550 No such file or directory
should not happen. Filezilla is trying to change the current directory to /. That directory should exist; it's the temporary directory created by the example out of which it serves files. There's also the potential, I suppose, that it's the example itself that is failing when it creates that temporary directory.
Here's how to read that debug output from Filezilla. You are looking at a transcript of the control channel between the client and server. Each line with =>
was sent from the client (FileZilla) to the server (ftpd). Each line with <<
was a reply from the server to the client. You can see that the server gets a single-line command, does something, and replies with one or more lines. It's all text, on the control channel. That makes debugging FTP very nice, compared to binary protocols. So here's what it all means:
<< 220 wconrad/ftpd 0.9.0
The client has connected; the server announces its version.
=> USER anonymous
<< 331 Password required
The client sends the user name. The server tells the client that it needs to send a password
=> PASS **************
<< 230 Logged in
Status server does not support non-ASCII characters
Status Connected
The client sends a password. Authentication succeeds and the client is logged in.
=> PWD
<< 257 "/" is current directory
The client asks for the current directory; the server replies
>> TYPE I
<< 200 Type set to I
The client asks that data transfers be done in binary mode. FTP supports an ascii mode which translates line-endings, so that, for example, a Windows user downloading a file with Unix line endings ends up with "\r\n" on his end, even though the line endings are just "\n" on the server end.
=> EPSV
<< 229 Entering extended passive mode (|||56096|)
FTP is a strange protocol in that the server attempts to make a data connection back to the client in order to transfer files and directory listings. With most clients being on a private network behind a firewall, that doesn't work too well. Passive mode tells the FTP server that, instead of the server making a data connection to the client, the client will be making a data connection to the server. The 56096 tells the client what port to connect to.
=> LIST
<< 150 Opening BINARY mode data connection
<< 226 Transfer complete
Status Directory contents displayed with success
Status Starting to send C:\Users\Mox\Desktop\uXhAGto.gif
The client wants a list of files; the server sends it. The list is not displayed in this transcript (the list goes over the data channel, not the control channel).
=> CWD /
<< 550 No such file or directory
Change directory to /. This is where things go weird.
=> MKD /
<< 550 No such file or directory
The client attempts to create the directory, no doubt in response to the failure of "CWD /". That doesn't work, either.
=> CWD /
<< 550 No such file or directory
The client attempts to change to / again. Still no good.
=> SIZE /uXhAGto.gif
<< 500 Syntax error, command unrecognized: SIZE /uXhAGto.gif
SIZE is an optional extension that FTPD does not support. It is supposed to report the number of octets that will be transferred when that file is downloaded. There is a relatively small set of core commands that must be supported by an RFC compliant FTP server. Clients are supposed to adapt gracefully to missing commands; the client does in this case.
=> MDTM /uXhAGto.gif
<< 500 Syntax error, command unrecognized: MDTM /uXhAGto.gif
MDTM is another optional extension.. I don't know what it does.
=> EPSV
<< 229 Entering extended passive mode (|||56102|)
If I recall, passive mode should be entered for each file transfer/directory listing. The client is going to transfer a file, so it enters passive mode again.
=> STOR /uXhAGto.gif
<< 550 No such file or directory
Error Critical error after transfering 726 638 octets in 1 second
And, finally, the client attempts to store the file. This fails, probably for the same unknown reason that the CWD/MKD commands have failed.
from ftpd.
By the way:
There's a fork of ftpd by @david-s-anderson that has something to do with Windows file systems. There's no pull request associated with it, and I've had no communication with the author, so I don't know anything about it:
from ftpd.
The change does allow files to be downloaded; however, I also had an issue with EPSV commands because they are not implemented. A workaround is to get the client to only attempt to connect over IPv4.
from ftpd.
@david-s-anderson - Thank you. Since you created your fork, I added IPV6 support to ftpd. However, it turns out that there's a problem with the IPV6 support under Windows, so that would need to be fixed, too.
Do you recall what File.expand_path was doing wrong under Windows that your patch fixes? I'd like to understand it a little better. I have to think that the way ftpd calls expand_path is somehow depending upon some undefined behavior--after all, expand_path is supposed to work just as well in Windows as it does under Linux.
from ftpd.
@m0x and other interested parties,
I've created a new feature branch, windows, for attempting to get ftpd to work with Windows. It contains hoped-for fixes to all known issues, namely:
- specs using File.symlink
- Missing constant Socket::IPV6_V6ONLY
- File system path issues [@david-s-anderson]
Your testing and feedback are greatly appreciated!
from ftpd.
I've added instructions to the README about how to use the experimental Windows branch. All you need is this line in your Gemfile:
gem 'ftpd', github: 'wconrad/ftpd', branch: 'windows'
Feedback needed! If it works for you, or does not, please add a comment here.
from ftpd.
When I start the ftp service, I can enter username and password for authorization. But after this, the following warnings come out.
warning: Ftpd::CommandHandler#reply at D:/ruby226/Ruby25-x64/lib/ruby/2.5.0/forwardable.rb:157 forwarding to private method Ftpd::Session#reply
warning: Ftpd::CommandHandler#expect at D:/ruby226/Ruby25-x64/lib/ruby/2.5.0/forwardable.rb:157 forwarding to private method Ftpd::Session#expect
warning: Ftpd::CommandHandler#login at D:/ruby226/Ruby25-x64/lib/ruby/2.5.0/forwardable.rb:157 forwarding to private method Ftpd::Session#login
warning: Ftpd::CommandHandler#reply at D:/ruby226/Ruby25-x64/lib/ruby/2.5.0/forwardable.rb:157 forwarding to private method Ftpd::Session#reply
warning: Ftpd::CommandHandler#expect at D:/ruby226/Ruby25-x64/lib/ruby/2.5.0/forwardable.rb:157 forwarding to private method Ftpd::Session#expect
warning: Ftpd::CommandHandler#login at D:/ruby226/Ruby25-x64/lib/ruby/2.5.0/forwardable.rb:157 forwarding to private method Ftpd::Session#login
warning: Ftpd::CommandHandler#reply at D:/ruby226/Ruby25-x64/lib/ruby/2.5.0/forwardable.rb:157 forwarding to private method Ftpd::Session#reply
warning: Ftpd::CommandHandler#ensure_logged_in at D:/ruby226/Ruby25-x64/lib/ruby/2.5.0/forwardable.rb:157 forwarding to private method Ftpd::Session#ensure_logged_in
warning: Ftpd::CommandHandler#ensure_accessible at D:/ruby226/Ruby25-x64/lib/ruby/2.5.0/forwardable.rb:157 forwarding to private method Ftpd::Session#ensure_accessible
from ftpd.
Related Issues (20)
- Unable to reuse same port after stopping server HOT 6
- #stop causes "Errno::ENOTCONN: Socket is not connected" in OSX HOT 8
- Connection Hangs on "ls" HOT 3
- Add more handlers
- Tests fail under Ruby >= 2.2.3 HOT 2
- External IP HOT 7
- Can I hooking filesystem operations HOT 4
- [IMPROVEMENT] Cmd Size and exotic filesystem
- forwarding to private method XXX HOT 3
- FTPPermError 550 Access Denied. HOT 2
- FTP base path lack of trailing `/` results in denial of service and disclosure of the local file system path HOT 1
- add bindir in gemspec HOT 2
- ftpd windows version , the ftp server will crash if input 'dir' HOT 1
- Using ruby 2.4 fails HOT 3
- Modernize usage of File.dirname(__FILE__) to support symlinks HOT 1
- CPU usage pegged at 100% HOT 9
- rake test:features seems to be broken HOT 2
- Issue with TLS protocol
- Error Connection reset by peer @ io_fillbuf - fd:158
- Update testing to use newer Ruby versions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ftpd.