I am trying to connect to a FTP server using VFS and upload a txt file, while doing that I am getting error as "commons.vfs2.FileSystemException: Could not determine the type of file"
Asked
Active
Viewed 1,942 times
1 Answers
0
Answer is pretty late. Even though the exception says Could not determine the type of file
, this may be due to a connection issue. If you are trying to connect via passive mode, make sure to allow the passive port range in your firewall. If you are using a docker container as the ftp server, make sure to expose a port range for the passive connections. (sample - https://github.com/stilliard/docker-pure-ftpd#using-different-passive-ports)
If you are not using passive mode and trying active mode, it is better to use passive mode since in active mode, server will actively try to connect to your application and you may have to expose your ip/ports too.

dilanSachi
- 562
- 6
- 14