FTP File Upload doesn't work - uploads empty files

旧时模样 提交于 2019-12-13 15:45:22

问题


Here's my problem. I have to edit the file of a website. The client gave me the ftp data.

When I connect everything works fine until I wanted to edit the file. When I was done editing and wanted to save it, it got replaced with an empty file on the server. I tried again several times, same results.

So then I tried writing the file on my computer and uploading it. It still uploads an empty file.

I randomly tried uploading anything, like an image, and it uploads a .jpg that's 0 bytes.

Has anyone encountered something like this before, or does anyone know what the cause may be and how it can be fixed?


回答1:


Please check server Space in your server i think space is full




回答2:


Wow, it's really long time since this has been asked, but just in case someone has a similar problem...

FTP communication happens simultaneously on two separate connections, one on port 21 (control port) and one on a port >1023 (data-transfer port). In case you obeserve a normal behaviour when connecting to and navigating on the server, but uploaded/downloaded files have no content (size of 0kB) after the transfer, then one possibility is that the data-transfer connection is blocked by the firewall, whereas the control connection isn't.

If possible, try to use passive mode for the connection on the client side, or check and open up your firewall settings.




回答3:


Most likely a permissions error, or possibly your client isn't using PASV. Paste logs from your ftp client, it may have a error/warning/etc



来源:https://stackoverflow.com/questions/20700425/ftp-file-upload-doesnt-work-uploads-empty-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!