Skip to main content

goFTP

Victoria , Hong Kong

Installation

To build the FTP server binary from source download the latest source from Gitea.

Configuration

Copy the default configuration file and edit it according to your needs:

cp config.sample.ini config.ini
nano config.ini

Now run the following commands:

go generate ./...
go build -tags=bindata -mod=vendor

Run the Server

The binary can now be executed:

./ftpd

2021/11/02 17:15:05 [Info] setting.go:98 Loaded config file: E:\ftpd\config.ini
2021/11/02 17:15:06 [Info] main.go:123 FTP Server v0.3.0
2021/11/02 17:15:06 Go Ftp Server listening on 2121
[tango] 2021/11/02 17:15:06 [Info] tan.go:148 Listening on http://0.0.0.0:8181

You can access the webui on your server IP with port 8181 and connect with the login you configured:

goFTP

And connect your clients:

goFTP

2021/11/02 17:16:30 a1ede10282752371d0f2  Connection Established
2021/11/02 17:16:30 a1ede10282752371d0f2 < 220 Welcome to the Go FTP Server
2021/11/02 17:16:30 a1ede10282752371d0f2 > AUTH TLS
2021/11/02 17:16:30 a1ede10282752371d0f2 < 550 Action not taken
2021/11/02 17:16:30 a1ede10282752371d0f2 > AUTH SSL
2021/11/02 17:16:30 a1ede10282752371d0f2 < 550 Action not taken
2021/11/02 17:16:33 a1ede10282752371d0f2 > USER admin
2021/11/02 17:16:33 a1ede10282752371d0f2 < 331 User name ok, password required
2021/11/02 17:16:33 a1ede10282752371d0f2 > PASS ****
2021/11/02 17:16:33 a1ede10282752371d0f2 < 230 Password ok, continue
2021/11/02 17:16:33 a1ede10282752371d0f2 > SYST
2021/11/02 17:16:33 a1ede10282752371d0f2 < 215 UNIX Type: L8
2021/11/02 17:16:33 a1ede10282752371d0f2 > FEAT
2021/11/02 17:16:33 a1ede10282752371d0f2 < 211 Extensions supported:
UTF8
EPSV
CLNT
MLSD
LPRT
EPRT
2021/11/02 17:16:33 a1ede10282752371d0f2 > CLNT FileZilla
2021/11/02 17:16:33 a1ede10282752371d0f2 < 200 OK
2021/11/02 17:16:33 a1ede10282752371d0f2 > OPTS UTF8 ON
2021/11/02 17:16:33 a1ede10282752371d0f2 < 200 UTF8 mode enabled
2021/11/02 17:16:33 a1ede10282752371d0f2 > PWD
2021/11/02 17:16:33 a1ede10282752371d0f2 < 257 "/" is the current directory
2021/11/02 17:16:33 a1ede10282752371d0f2 > TYPE I
2021/11/02 17:16:33 a1ede10282752371d0f2 < 200 Type set to binary
2021/11/02 17:16:33 a1ede10282752371d0f2 > PASV
2021/11/02 17:16:33 a1ede10282752371d0f2 < 227 Entering Passive Mode (192,168,2,112,210,251)
2021/11/02 17:16:33 a1ede10282752371d0f2 > MLSD
2021/11/02 17:16:33 a1ede10282752371d0f2 < 150 Opening ASCII mode data connection for file list
2021/11/02 17:16:33 a1ede10282752371d0f2 < 226 Closing data connection, sent 0 bytes
2021/11/02 17:16:44 a1ede10282752371d0f2 > PASV
2021/11/02 17:16:44 a1ede10282752371d0f2 < 227 Entering Passive Mode (192,168,2,112,210,253)
2021/11/02 17:16:44 a1ede10282752371d0f2 > STOR test
2021/11/02 17:16:44 a1ede10282752371d0f2 < 150 Data transfer starting
2021/11/02 17:16:44 a1ede10282752371d0f2 < 226 OK, received 0 bytes
2021/11/02 17:18:24 a1ede10282752371d0f2 Connection Established
2021/11/02 17:18:24 a1ede10282752371d0f2 < 220 Welcome to the Go FTP Server
2021/11/02 17:18:24 a1ede10282752371d0f2 > USER admin
2021/11/02 17:18:24 a1ede10282752371d0f2 < 331 User name ok, password required
2021/11/02 17:18:24 a1ede10282752371d0f2 > PASS ****
2021/11/02 17:18:24 a1ede10282752371d0f2 < 230 Password ok, continue
2021/11/02 17:18:24 a1ede10282752371d0f2 > TYPE I
2021/11/02 17:18:24 a1ede10282752371d0f2 < 200 Type set to binary
2021/11/02 17:18:24 a1ede10282752371d0f2 > CWD ./Camera1/20211102/images/
2021/11/02 17:18:24 a1ede10282752371d0f2 CreateFile ./Camera1/20211102/images: The system cannot find the path specified.
2021/11/02 17:18:24 a1ede10282752371d0f2 < 550 Directory change to /Camera1/20211102/images failed.
2021/11/02 17:18:24 a1ede10282752371d0f2 > XMKD ./Camera1
2021/11/02 17:18:24 a1ede10282752371d0f2 < 257 Directory created
2021/11/02 17:18:24 a1ede10282752371d0f2 > XMKD ./Camera1/20211102
2021/11/02 17:18:24 a1ede10282752371d0f2 < 257 Directory created
2021/11/02 17:18:24 a1ede10282752371d0f2 > XMKD ./Camera1/20211102/images
2021/11/02 17:18:24 a1ede10282752371d0f2 < 257 Directory created
2021/11/02 17:18:24 a1ede10282752371d0f2 > CWD ./Camera1/20211102/images/
2021/11/02 17:18:24 a1ede10282752371d0f2 < 250 Directory changed to /Camera1/20211102/images
2021/11/02 17:18:24 a1ede10282752371d0f2 > PASV
2021/11/02 17:18:24 a1ede10282752371d0f2 < 227 Entering Passive Mode (192,168,2,112,195,50)
2021/11/02 17:18:24 a1ede10282752371d0f2 > STOR T21110210182200.jpg
2021/11/02 17:18:24 a1ede10282752371d0f2 < 150 Data transfer starting
2021/11/02 17:18:24 a1ede10282752371d0f2 < 226 OK, received 160165 bytes
2021/11/02 17:18:24 a1ede10282752371d0f2 > QUIT
2021/11/02 17:18:24 a1ede10282752371d0f2 < 221 Goodbye
2021/11/02 17:18:24 a1ede10282752371d0f2 Connection Terminated