B4J Question B4X FTP Server Invalid Path

Blueforcer

Well-Known Member
Licensed User
Longtime User
im using the B4X FTP Server, but i have several problems:

Im using the example to start it:

B4X:
    server.Initialize(Me, "FTPServer")
    server.SetPorts(51041, 51042, 51142)
    server.AddUser("Test", "test")
    'server.AddUser("anonymous", "") 'anonymous access
    'server.ForcedServerIp = "127.0.0.1" 'local access
    server.BaseDir = File.DirApp
    server.start

i can connect and i see all folders and files.
But i cant do anything. No upload, no delete, no folder change.

I always get:
B4X:
Status:    Retrieving directory listing of "/Apps"...
Command:    CWD /
Response:    450 Invalid path:
Error:    Failed to retrieve directory listing

the FTPServer log only outputs:
client: CWD /
 

Xfood

Expert
Licensed User
some time ago I created an ftp nserver in b4j I am attaching the source
 

Attachments

  • serverFtp.zip
    127.8 KB · Views: 150
Upvote 0

Blueforcer

Well-Known Member
Licensed User
Longtime User
hello, I use it without any problem, maybe your firewall is blocking transmissions?
Connection is working. But for any reason every CWD command gives a parameter of "/". Doesnt matter wich folder i want to open.
I also tried a different computer with a different FTP client
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I made the following test:

1. Downloaded the B4J FTP server example.
2. Changed the base dir to File.DirApp and ran it.
3. Connected with a FTP client:

1609748924860.png


Note the port and PASV.

4. It works.

1609748945996.png
 
Upvote 0
Top