hfiref0x / LightFTP

Small x86-32/x64 FTP Server
BSD 2-Clause "Simplified" License
232 stars 83 forks source link

issue with commands working with files #23

Closed behnamben closed 1 year ago

behnamben commented 2 years ago

I tried to use file-related commands like LIST or RETR or STOR, but they would return: "150 File status okay; about to open data connection. 451 Requested action aborted. Local error in processing." Is there something wrong?

UldisRinkevichs commented 2 years ago

Hi! Can you post here details about your command sequence that produces error? Also try to check your configuration files for errors in local file system path and its availability for ftp process user.

behnamben commented 2 years ago

For example:

USER ubuntu PASS ubuntu LIST

would always give me the error 150 File status okay; about to open data connection. 451 Requested action aborted. Local error in processing.

The user ubuntu has the admin access and the OS ufw is disabled.

UldisRinkevichs commented 2 years ago

Are you trying to use FTP by hand with telnet-like client or your custom software? The PASV/PORT command must precede LIST/RETR/STOR/MLSD commands to create a second data channel they use.

https://datatracker.ietf.org/doc/html/rfc959

behnamben commented 2 years ago

I also tried:

USER ubuntu PASS ubuntu PORT 127,0,0,1,152,193 RETR file.f

and it gave me the same error. Am I doing something wrong here?

hfiref0x commented 2 years ago

Out of curiosity, what you want to do? Do you writing a client, that is connecting to the ftp server?

behnamben commented 2 years ago

I was trying to automate these messages so I can use this as a case study for my research. However, I saw that some of the commands are never working. So I'm trying to use them manually to make them work and then add them to my tool.

The main goal is to send a different combination of commands and then extract a state machine out of the responses from the FTP server.