B4J Question FTP app directory permissions ?

RickV

Member
I tried the suggestion of using ftp server and copied the code into my server project to add the ftp server functionality as exactly as the demo example in https://www.b4x.com/android/forum/t...d-with-socket-and-asyncstreams.74320/#content

I have created a folder c:\data\ftp
FTPSer.BaseDir = IIf(xui.IsB4J, "c:\data\ftp", xui.DefaultFolder)
and crated a user - FTPSer.AddUser("zz", "zz")

Listen port set to 21 - FTPSer.SetPorts(21, 65500, 65535)

OS win 11.
direct file explorer to 192.168.1.240 (b4j server app)
My file explorer gives an error after successful login. attached image and the logs from the b4J app below.

I am wondering what permissions do I need to set? Any extras on the directory c:\data\ftp ?
I tried adding anom user.... and adding it to the user list in code too
This server app is a desktop application that does many tasks, user maintenance, device authorities, sms and paging etc so a widndows user is logged in at all times (admin).
B4J is in debug mode but get same result in release mode.

B4X:
Waiting for debugger to connect...
Program started.
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Adding credentials
Adding Connection Test Query
My ip: 192.168.1.240
Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events.
http://192.168.1.239/index.html
finished loading page......
Number of clients: 0
client: USER anonymous
Number of clients: 0
client: PASS IEUser@
Error: Invalid username or password.
client: USER anonymous
terminated
Number of clients: 0
terminated
Number of clients: 0
client: USER zz
client: PASS zz
User logged in: zz
client: opts utf8 on
client: PWD
terminated
Number of clients: 0
Number of clients: 0
client: USER zz
client: PASS zz
User logged in: zz
Number of clients: 0
client: opts utf8 on
client: USER zz
client: syst
client: PASS zz
User logged in: zz
client: site help
client: opts utf8 on
client: PWD
client: PWD
client: TYPE A
client: TYPE A
client: PASV
java.net.SocketException: Software caused connection abort: recv failed
    at java.base/java.net.SocketInputStream.socketRead0(Native Method)
    at java.base/java.net.SocketInputStream.socketRead(SocketInputStream.java:115)
    at java.base/java.net.SocketInputStream.read(SocketInputStream.java:168)
    at java.base/java.net.SocketInputStream.read(SocketInputStream.java:140)
    at java.base/java.net.SocketInputStream.read(SocketInputStream.java:126)
    at anywheresoftware.b4a.randomaccessfile.AsyncStreams$AIN.run(AsyncStreams.java:232)
    at java.base/java.lang.Thread.run(Thread.java:834)
java.net.SocketException: Software caused connection abort: socket write error
    at java.base/java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.base/java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:110)
    at java.base/java.net.SocketOutputStream.write(SocketOutputStream.java:138)
    at anywheresoftware.b4a.randomaccessfile.AsyncStreams$AOUT.run(AsyncStreams.java:380)
    at java.base/java.lang.Thread.run(Thread.java:834)
error: (SocketException) java.net.SocketException: Software caused connection abort: socket write error
error: (SocketException) java.net.SocketException: Software caused connection abort: socket write error
client: PASV
java.net.SocketException: Software caused connection abort: socket write error
    at java.base/java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.base/java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:110)
    at java.base/java.net.SocketOutputStream.write(SocketOutputStream.java:138)
    at anywheresoftware.b4a.randomaccessfile.AsyncStreams$AOUT.run(AsyncStreams.java:380)
    at java.base/java.lang.Thread.run(Thread.java:834)
java.net.SocketException: Software caused connection abort: recv failed
    at java.base/java.net.SocketInputStream.socketRead0(Native Method)
    at java.base/java.net.SocketInputStream.socketRead(SocketInputStream.java:115)
    at java.base/java.net.SocketInputStream.read(SocketInputStream.java:168)
    at java.base/java.net.SocketInputStream.read(SocketInputStream.java:140)
    at java.base/java.net.SocketInputStream.read(SocketInputStream.java:126)
    at anywheresoftware.b4a.randomaccessfile.AsyncStreams$AIN.run(AsyncStreams.java:232)
    at java.base/java.lang.Thread.run(Thread.java:834)
terminated
DataConnection_Close
Number of clients: 0
terminated
error: (SocketException) java.net.SocketException: Software caused connection abort: recv failed
error: (SocketException) java.net.SocketException: Software caused connection abort: recv failed
terminated
DataConnection_Close
Number of clients: 0
terminated
 

Attachments

  • 0permissions.jpg
    0permissions.jpg
    32 KB · Views: 13
Top