卷曲ftp上传文件权限

时间:2016-09-05 07:03:10

标签: linux curl ftp server

我尝试将一些文件上传到本地网络中的另一台服务器。

curl -v -T filename ftp://192.168.1.17//home/ --user user:mypass

登录参数,路径和地址是正确的。我已经复活了

< 220 (vsFTPd 3.0.2)
> USER user
< 331 Please specify the password.
> PASS mypass
< 230 Login successful.
> PWD
< 257 "/home/"
* Entry path is '/home/'
> CWD /
* ftp_perform ends with SECONDARY: 0
< 250 Directory successfully changed.
> CWD home
< 250 Directory successfully changed.
> EPSV
* Connect data stream passively
< 229 Entering Extended Passive Mode (|||64962|).
*   Trying 192.168.1.17...
* Connecting to 192.168.1.17 (192.168.1.17) port 64962
* Connected to 192.168.1.17 (192.168.1.17) port 21 (#0)
> TYPE I
< 200 Switching to Binary mode.
> STOR filename
< 550 Permission denied.
* Failed FTP upload: 550

根据curl不是许可。我确定persmission设置正确,甚至尝试777.当我使用像filezilla上传的ftp客户端是可以的。请帮忙

2 个答案:

答案 0 :(得分:0)

  

&LT; 550许可被拒绝。

这是来自FTP服务器的消息,它不允许您写入根/。根据您提供的URL,您的意图不是写入/而是写入/home。如果从URL中删除重复的斜杠,也许会有所帮助,即

instead of   ftp://192.168.1.17//home/
use          ftp://192.168.1.17/home/

答案 1 :(得分:0)

I solved it. I forgot to close files after upload(local, remote).

Try this instead.