dutchcoders / dutchcoders/goftp
Neither method after Connect and Login works
- Dominant language
- Go
- Stars
- 280
- Forks
- 94
- PR merge metrics
- No merged PRs in 30d
Description
All these methods throw 230 error:
`ftp.Cwd("/")`
`ftp.Pwd()`
`ftp.List("/")`
I want to connect to IMDB ftp, `ftp://ftp.fu-berlin.de`. I'm trying to use your package.
Here is an example of the error:
```
$ read_db
List Error
panic: 230 FTP.FU-Berlin.DE login ok.
goroutine 1 [running]:
main.main()
C:/Users/user/sbox/go/src/bitbucket.org/wzup/read_db/readDb.go:51 +0x47b
```
Here is my code, just a copy/paste of your example:
```
package main
import (
"fmt"
"github.com/dutchcoders/goftp"
)
func main() {
/**
* dutchcoders/goftp
*/
var err error
var ftp *goftp.FTP
// For debug messages: goftp.ConnectDbg("ftp.server.com:21")
if ftp, err = goftp.Connect("ftp.fu-berlin.de:21"); err != nil {
fmt.Println("Connect Error")
panic(err)
}
defer ftp.Close()
if err = ftp.Login("admin", "sdkjcfnjoindsio"); err != nil {
fmt.Println("Login Error")
panic(err)
}
if err = ftp.Cwd("/"); err != nil {
fmt.Println("Cwd Error")
panic(err)
}
var curpath string
if curpath, err = ftp.Pwd(); err != nil {
fmt.Println("Pwd Error")
panic(err)
}
fmt.Printf("Current path: %s", curpath)
var files []string
if files, err = ftp.List("/"); err != nil {
fmt.Println("List Error")
panic(err)
}
fmt.Println(files)
}
```
What do I do wrong? Why I cannot get an access to ftp server and see and download its contents?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.