node-ftp icon indicating copy to clipboard operation
node-ftp copied to clipboard

i'am use put encounter 'Could not create file';

Open sowdf opened this issue 8 years ago • 6 comments

[connection] < '220 (vsFTPd 2.0.5)\r\n' [parser] < '220 (vsFTPd 2.0.5)\r\n' [parser] Response: code=220, buffer='(vsFTPd 2.0.5)' [connection] > 'USER zgb' [connection] < '331 Please specify the password.\r\n' [parser] < '331 Please specify the password.\r\n' [parser] Response: code=331, buffer='Please specify the password.' [connection] > 'PASS Zgb4399' [connection] < '230 Login successful.\r\n' [parser] < '230 Login successful.\r\n' [parser] Response: code=230, buffer='Login successful.' [connection] > 'FEAT' [connection] < '211-Features:\r\n EPRT\r\n EPSV\r\n' [connection] < ' MDTM\r\n PASV\r\n REST STREAM\r\n SIZE\r\n TVFS\r\n UTF8\r\n211 End\r\n' [parser] < '211-Features:\r\n EPRT\r\n EPSV\r\n MDTM\r\n PASV\r\n REST STREAM\r\n SIZE\r\n TVFS\r\n UTF8\r\n211 End\r\n' [parser] Response: code=211, buffer='Features:\r\n EPRT\r\n EPSV\r\n MDTM\r\n PASV\r\n REST STREAM\r\n SIZE\r\n TVFS\r\n UTF8\r\nEnd' [connection] > 'TYPE I' [connection] < '200 Switching to Binary mode.\r\n' [parser] < '200 Switching to Binary mode.\r\n' [parser] Response: code=200, buffer='Switching to Binary mode.' /Users/caozhihui/Desktop/code/web/module/androidMobile/resource/release/index.css [connection] > 'PASV' [connection] < '227 Entering Passive Mode (192,168,51,203,213,48)\r\n' [parser] < '227 Entering Passive Mode (192,168,51,203,213,48)\r\n' [parser] Response: code=227, buffer='Entering Passive Mode (192,168,51,203,213,48)' [connection] PASV socket connected [connection] > 'LIST' [connection] < '150 Here comes the directory listing.\r\n' [parser] < '150 Here comes the directory listing.\r\n' [parser] Response: code=150, buffer='Here comes the directory listing.' [connection] < '226 Directory send OK.\r\n' [parser] < '226 Directory send OK.\r\n' [parser] Response: code=226, buffer='Directory send OK.' { type: 'd', name: 'www.4399.cn', target: undefined, sticky: false, rights: { user: 'rwx', group: 'rwx', other: 'rwx' }, acl: false, owner: '0', group: '0', size: 4096, date: 2014-06-27T00:00:00.000Z } [connection] > 'PASV' [connection] < '227 Entering Passive Mode (192,168,51,203,157,117)\r\n' [parser] < '227 Entering Passive Mode (192,168,51,203,157,117)\r\n' [parser] Response: code=227, buffer='Entering Passive Mode (192,168,51,203,157,117)' [connection] PASV socket connected [connection] > 'STOR ./foo.remote-copy.txt' [connection] < '553 Could not create file.\r\n' [parser] < '553 Could not create file.\r\n'

sowdf avatar Oct 09 '17 07:10 sowdf

I have a same problem, but my webstorm can upload files to same remote dir.

rainer800hao avatar Oct 12 '17 03:10 rainer800hao

I have a same problem,but it is successful with FLASHFXP

qiuzx20 avatar Oct 18 '17 03:10 qiuzx20

I think you simply have no right to upload to the root folder. Use cwd function:

c.on('ready', function() {
  c.cwd('www.4399.cn', function() {
    c.put('foo.txt', 'foo.remote-copy.txt', function(err) {
        if (err) throw err;
        c.end();
      });
  });
});

icetee avatar Oct 28 '17 17:10 icetee

我也遇到了同样的问题,无法新建文件夹,你们解决了吗,求告知 I have the same problem. I cannot create a new folder. Have you solved it? Please let me know

hjaiim avatar Aug 05 '18 00:08 hjaiim

I have the same problem

weislywang avatar Nov 09 '18 11:11 weislywang

I have the same problem and I find that I think the file in FTP server is the remote file but it's the local file in the method, so maybe you can try to exchange the location of the parameters.

OmegaZhou avatar Sep 29 '19 03:09 OmegaZhou