Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not access file: open D:\\\\/virtual/file2.txt #87

Closed
shellus opened this issue Sep 28, 2018 · 2 comments
Closed

Could not access file: open D:\\\\/virtual/file2.txt #87

shellus opened this issue Sep 28, 2018 · 2 comments

Comments

@shellus
Copy link

shellus commented Sep 28, 2018

When I visit ftp://127.0.0.1:2121/virtual/ I get the correct list
The console displays:

level=info ts=2018-09-28T09:53:28.2871371Z caller=server.go:198 component=server clientId=17 msg="FTP Client connected" action=ftp.connected clientIp=127.0.0.1:54885
level=debug ts=2018-09-28T09:53:28.2871371Z caller=client_handler.go:194 component=server clientId=17 msg="FTP SEND" action=ftp.cmd_send line="220 Welcome on ftpserver, you're on dir D:\\, your ID is 17, your IP:port is 127.0.0.1:54885, we currently have 1 clients connected"
level=debug ts=2018-09-28T09:53:28.2871371Z caller=client_handler.go:159 component=server clientId=17 msg="FTP RECV" action=ftp.cmd_recv line="USER anonymous\r\n"
level=debug ts=2018-09-28T09:53:28.2871371Z caller=client_handler.go:194 component=server clientId=17 msg="FTP SEND" action=ftp.cmd_send line="331 OK"
level=debug ts=2018-09-28T09:53:28.2871371Z caller=client_handler.go:159 component=server clientId=17 msg="FTP RECV" action=ftp.cmd_recv line="PASS chrome@example.com\r\n"
level=debug ts=2018-09-28T09:53:28.2871371Z caller=client_handler.go:194 component=server clientId=17 msg="FTP SEND" action=ftp.cmd_send line="530 Authentication problem: could not authenticate you"
level=error ts=2018-09-28T09:53:28.2871371Z caller=client_handler.go:145 component=server clientId=17 msg="Network error" action=ftp.net_error err="read tcp 127.0.0.1:2121->127.0.0.1:54885: use of closed network connection"
level=info ts=2018-09-28T09:53:28.2871371Z caller=server.go:205 component=server clientId=17 msg="FTP Client disconnected" action=ftp.disconnected clientIp=127.0.0.1:54885
level=info ts=2018-09-28T09:53:28.2871371Z caller=server.go:198 component=server clientId=18 msg="FTP Client connected" action=ftp.connected clientIp=127.0.0.1:54886
level=debug ts=2018-09-28T09:53:28.2881344Z caller=client_handler.go:194 component=server clientId=18 msg="FTP SEND" action=ftp.cmd_send line="220 Welcome on ftpserver, you're on dir D:\\, your ID is 18, your IP:port is 127.0.0.1:54886, we currently have 1 clients connected"
level=debug ts=2018-09-28T09:53:28.2881344Z caller=client_handler.go:159 component=server clientId=18 msg="FTP RECV" action=ftp.cmd_recv line="USER shellus\r\n"
level=debug ts=2018-09-28T09:53:28.2881344Z caller=client_handler.go:194 component=server clientId=18 msg="FTP SEND" action=ftp.cmd_send line="331 OK"
level=debug ts=2018-09-28T09:53:28.2881344Z caller=client_handler.go:159 component=server clientId=18 msg="FTP RECV" action=ftp.cmd_recv line="PASS a7245810\r\n"
level=debug ts=2018-09-28T09:53:28.2881344Z caller=client_handler.go:194 component=server clientId=18 msg="FTP SEND" action=ftp.cmd_send line="230 Password ok, continue"
level=debug ts=2018-09-28T09:53:28.2881344Z caller=client_handler.go:159 component=server clientId=18 msg="FTP RECV" action=ftp.cmd_recv line="SYST\r\n"
level=debug ts=2018-09-28T09:53:28.2881344Z caller=client_handler.go:194 component=server clientId=18 msg="FTP SEND" action=ftp.cmd_send line="215 UNIX Type: L8"
level=debug ts=2018-09-28T09:53:28.2881344Z caller=client_handler.go:159 component=server clientId=18 msg="FTP RECV" action=ftp.cmd_recv line="PWD\r\n"
level=debug ts=2018-09-28T09:53:28.2881344Z caller=client_handler.go:194 component=server clientId=18 msg="FTP SEND" action=ftp.cmd_send line="257 \"/\" is the current directory"
level=debug ts=2018-09-28T09:53:28.2881344Z caller=client_handler.go:159 component=server clientId=18 msg="FTP RECV" action=ftp.cmd_recv line="TYPE I\r\n"
level=debug ts=2018-09-28T09:53:28.2881344Z caller=client_handler.go:194 component=server clientId=18 msg="FTP SEND" action=ftp.cmd_send line="200 Type set to binary"
level=debug ts=2018-09-28T09:53:28.2891325Z caller=client_handler.go:159 component=server clientId=18 msg="FTP RECV" action=ftp.cmd_recv line="SIZE /virtual\r\n"
level=debug ts=2018-09-28T09:53:28.2891325Z caller=client_handler.go:194 component=server clientId=18 msg="FTP SEND" action=ftp.cmd_send line="213 4096"
level=debug ts=2018-09-28T09:53:28.2891325Z caller=client_handler.go:159 component=server clientId=18 msg="FTP RECV" action=ftp.cmd_recv line="CWD /virtual/\r\n"
level=debug ts=2018-09-28T09:53:28.2891325Z caller=client_handler.go:194 component=server clientId=18 msg="FTP SEND" action=ftp.cmd_send line="250 CD worked on /virtual"
level=debug ts=2018-09-28T09:53:28.2891325Z caller=client_handler.go:159 component=server clientId=18 msg="FTP RECV" action=ftp.cmd_recv line="PASV\r\n"
level=debug ts=2018-09-28T09:53:28.2891325Z caller=client_handler.go:194 component=server clientId=18 msg="FTP SEND" action=ftp.cmd_send line="227 Entering Passive Mode (47,74,227,152,8,108)"
level=debug ts=2018-09-28T09:53:28.2891325Z caller=client_handler.go:159 component=server clientId=18 msg="FTP RECV" action=ftp.cmd_recv line="LIST -l\r\n"
level=debug ts=2018-09-28T09:53:28.2891325Z caller=client_handler.go:194 component=server clientId=18 msg="FTP SEND" action=ftp.cmd_send line="150 Using transfer connection"
level=debug ts=2018-09-28T09:53:28.2891325Z caller=client_handler.go:213 component=server clientId=18 msg="FTP Transfer connection opened" action=ftp.transfer_open remoteAddr=127.0.0.1:54887 localAddr=127.0.0.1:2156
level=debug ts=2018-09-28T09:53:28.2891325Z caller=client_handler.go:194 component=server clientId=18 msg="FTP SEND" action=ftp.cmd_send line="226 Closing transfer connection"
level=debug ts=2018-09-28T09:53:28.2891325Z caller=client_handler.go:224 component=server clientId=18 msg="FTP Transfer connection closed" action=ftp.transfer_close
level=debug ts=2018-09-28T09:53:28.2911262Z caller=client_handler.go:159 component=server clientId=18 msg="FTP RECV" action=ftp.cmd_recv line="QUIT\r\n"
level=debug ts=2018-09-28T09:53:28.292124Z caller=client_handler.go:194 component=server clientId=18 msg="FTP SEND" action=ftp.cmd_send line="221 Goodbye"
level=debug ts=2018-09-28T09:53:28.292124Z caller=client_handler.go:116 component=server clientId=18 msg="Clean disconnect" action=ftp.disconnect clean=true
level=info ts=2018-09-28T09:53:28.292124Z caller=server.go:205 component=server clientId=18 msg="FTP Client disconnected" action=ftp.disconnected clientIp=127.0.0.1:54886

When I visit ftp://127.0.0.1:2121/virtual/file2.txt
I saw an error on the console: Could not access file: open D:\\\\/virtual/file2.txt
Console output:

level=info ts=2018-09-28T09:54:10.5631251Z caller=server.go:198 component=server clientId=19 msg="FTP Client connected" action=ftp.connected clientIp=127.0.0.1:54948
level=debug ts=2018-09-28T09:54:10.5631251Z caller=client_handler.go:194 component=server clientId=19 msg="FTP SEND" action=ftp.cmd_send line="220 Welcome on ftpserver, you're on dir D:\\, your ID is 19, your IP:port is 127.0.0.1:54948, we currently have 1 clients connected"
level=debug ts=2018-09-28T09:54:10.5631251Z caller=client_handler.go:159 component=server clientId=19 msg="FTP RECV" action=ftp.cmd_recv line="USER anonymous\r\n"
level=debug ts=2018-09-28T09:54:10.5631251Z caller=client_handler.go:194 component=server clientId=19 msg="FTP SEND" action=ftp.cmd_send line="331 OK"
level=debug ts=2018-09-28T09:54:10.5631251Z caller=client_handler.go:159 component=server clientId=19 msg="FTP RECV" action=ftp.cmd_recv line="PASS chrome@example.com\r\n"
level=debug ts=2018-09-28T09:54:10.5631251Z caller=client_handler.go:194 component=server clientId=19 msg="FTP SEND" action=ftp.cmd_send line="530 Authentication problem: could not authenticate you"
level=error ts=2018-09-28T09:54:10.5631251Z caller=client_handler.go:145 component=server clientId=19 msg="Network error" action=ftp.net_error err="read tcp 127.0.0.1:2121->127.0.0.1:54948: use of closed network connection"
level=info ts=2018-09-28T09:54:10.5631251Z caller=server.go:205 component=server clientId=19 msg="FTP Client disconnected" action=ftp.disconnected clientIp=127.0.0.1:54948
level=info ts=2018-09-28T09:54:10.5640955Z caller=server.go:198 component=server clientId=20 msg="FTP Client connected" action=ftp.connected clientIp=127.0.0.1:54949
level=debug ts=2018-09-28T09:54:10.5640955Z caller=client_handler.go:194 component=server clientId=20 msg="FTP SEND" action=ftp.cmd_send line="220 Welcome on ftpserver, you're on dir D:\\, your ID is 20, your IP:port is 127.0.0.1:54949, we currently have 1 clients connected"
level=debug ts=2018-09-28T09:54:10.5640955Z caller=client_handler.go:159 component=server clientId=20 msg="FTP RECV" action=ftp.cmd_recv line="USER shellus\r\n"
level=debug ts=2018-09-28T09:54:10.5640955Z caller=client_handler.go:194 component=server clientId=20 msg="FTP SEND" action=ftp.cmd_send line="331 OK"
level=debug ts=2018-09-28T09:54:10.5640955Z caller=client_handler.go:159 component=server clientId=20 msg="FTP RECV" action=ftp.cmd_recv line="PASS a7245810\r\n"
level=debug ts=2018-09-28T09:54:10.5640955Z caller=client_handler.go:194 component=server clientId=20 msg="FTP SEND" action=ftp.cmd_send line="230 Password ok, continue"
level=debug ts=2018-09-28T09:54:10.5640955Z caller=client_handler.go:159 component=server clientId=20 msg="FTP RECV" action=ftp.cmd_recv line="SYST\r\n"
level=debug ts=2018-09-28T09:54:10.5640955Z caller=client_handler.go:194 component=server clientId=20 msg="FTP SEND" action=ftp.cmd_send line="215 UNIX Type: L8"
level=debug ts=2018-09-28T09:54:10.5640955Z caller=client_handler.go:159 component=server clientId=20 msg="FTP RECV" action=ftp.cmd_recv line="PWD\r\n"
level=debug ts=2018-09-28T09:54:10.5640955Z caller=client_handler.go:194 component=server clientId=20 msg="FTP SEND" action=ftp.cmd_send line="257 \"/\" is the current directory"
level=debug ts=2018-09-28T09:54:10.5640955Z caller=client_handler.go:159 component=server clientId=20 msg="FTP RECV" action=ftp.cmd_recv line="TYPE I\r\n"
level=debug ts=2018-09-28T09:54:10.5640955Z caller=client_handler.go:194 component=server clientId=20 msg="FTP SEND" action=ftp.cmd_send line="200 Type set to binary"
level=debug ts=2018-09-28T09:54:10.5640955Z caller=client_handler.go:159 component=server clientId=20 msg="FTP RECV" action=ftp.cmd_recv line="SIZE /virtual/file2.txt\r\n"
level=debug ts=2018-09-28T09:54:10.5650925Z caller=client_handler.go:194 component=server clientId=20 msg="FTP SEND" action=ftp.cmd_send line="550 Couldn't access /virtual/file2.txt: CreateFile D:\\\\/virtual/file2.txt: The system cannot find the path specified."
level=debug ts=2018-09-28T09:54:10.5650925Z caller=client_handler.go:159 component=server clientId=20 msg="FTP RECV" action=ftp.cmd_recv line="CWD /virtual/file2.txt\r\n"
level=debug ts=2018-09-28T09:54:10.5650925Z caller=client_handler.go:194 component=server clientId=20 msg="FTP SEND" action=ftp.cmd_send line="550 CD issue: CreateFile D:\\\\/virtual/file2.txt: The system cannot find the path specified."
level=debug ts=2018-09-28T09:54:10.5650925Z caller=client_handler.go:159 component=server clientId=20 msg="FTP RECV" action=ftp.cmd_recv line="PASV\r\n"
level=debug ts=2018-09-28T09:54:10.5660899Z caller=client_handler.go:194 component=server clientId=20 msg="FTP SEND" action=ftp.cmd_send line="227 Entering Passive Mode (47,74,227,152,8,128)"
level=debug ts=2018-09-28T09:54:10.5660899Z caller=client_handler.go:159 component=server clientId=20 msg="FTP RECV" action=ftp.cmd_recv line="RETR /virtual/file2.txt\r\n"
level=debug ts=2018-09-28T09:54:10.5660899Z caller=client_handler.go:194 component=server clientId=20 msg="FTP SEND" action=ftp.cmd_send line="550 Could not access file: open D:\\\\/virtual/file2.txt: The system cannot find the path specified."
level=debug ts=2018-09-28T09:54:10.5660899Z caller=client_handler.go:159 component=server clientId=20 msg="FTP RECV" action=ftp.cmd_recv line="QUIT\r\n"
level=debug ts=2018-09-28T09:54:10.5660899Z caller=client_handler.go:194 component=server clientId=20 msg="FTP SEND" action=ftp.cmd_send line="221 Goodbye"
level=debug ts=2018-09-28T09:54:10.5670869Z caller=client_handler.go:116 component=server clientId=20 msg="Clean disconnect" action=ftp.disconnect clean=true
level=info ts=2018-09-28T09:54:10.5670869Z caller=server.go:205 component=server clientId=20 msg="FTP Client disconnected" action=ftp.disconnected clientIp=127.0.0.1:54949

CreateFile D:\\/virtual/file2.txt: The system cannot find the path specified."

I think this is a path processing error
Whether I use -data D:\\ or D:\ or D:/ or D: or D or . I get an error absPath

@fclairamb
Copy link
Owner

Nope, the "virtual" directory is by definition virtual, it's only here to show you how you could implement your file system. The only supported operation is listing and getting files.

@fclairamb
Copy link
Owner

Clarified this with #87.

probot-auto-merge bot added a commit that referenced this issue Dec 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants