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

ftp failed to work with .sock file #308

Closed
mattiagalati opened this issue Sep 6, 2018 · 19 comments
Closed

ftp failed to work with .sock file #308

mattiagalati opened this issue Sep 6, 2018 · 19 comments

Comments

@mattiagalati
Copy link

Expected Behavior

Upload file with no issues

Actual Behavior

File is not uploaded due to error in subject

Steps to Reproduce the Problem

  1. Create a config file like this:
{
    "name": "FTP Server",
    "protocol": "ftp",
    "host": "ftp.myhost.com",
    "username": "user",
    "password": "pass",
    "remotePath": "/var/www/mywebsite.com",
    "uploadOnSave": true,
    "ignore": [
        ".vscode",
        ".git",
        ".DS_Store",
        "/env",
        "__pycache__"
    ]
}
  1. Open a file.
  2. Save.

Requisites (important to diagnose the problem!)

Extension Logs

[error] Error: Create directory operation failed.
	at makeError (C:\Users\Mattia\.vscode\extensions\liximomo.sftp-1.4.1\node_modules\ftp\lib\connection.js:1067:13)
	at Parser.<anonymous> (C:\Users\Mattia\.vscode\extensions\liximomo.sftp-1.4.1\node_modules\ftp\lib\connection.js:113:25)
	at emitTwo (events.js:126:13)
	at Parser.emit (events.js:214:7)
	at Parser._write (C:\Users\Mattia\.vscode\extensions\liximomo.sftp-1.4.1\node_modules\ftp\lib\parser.js:59:10)
	at doWrite (_stream_writable.js:387:12)
	at writeOrBuffer (_stream_writable.js:373:5)
	at Parser.Writable.write (_stream_writable.js:290:11)
	at Socket.ondata (C:\Users\Mattia\.vscode\extensions\liximomo.sftp-1.4.1\node_modules\ftp\lib\connection.js:273:20)
	at emitOne (events.js:116:13)
	at Socket.emit (events.js:211:7)
	at addChunk (_stream_readable.js:263:12)
	at readableAddChunk (_stream_readable.js:250:11)
	at Socket.Readable.push (_stream_readable.js:208:10)
	at TCP.onread (net.js:594:20)

Specifications

  • Version: 1.4.1
  • Platform: Windows
@liximomo
Copy link
Owner

liximomo commented Sep 6, 2018

Full logs, please.

@mattiagalati
Copy link
Author

Sorry, forgot to reload VSCode, here you are:

[trace] execute upload for d:\PROGETTI\mywebsite.com\templates\ddt.xml
[debug] < 220 (vsFTPd 3.0.3)
[debug] > USER user
[debug] < 331 Please specify the password.
[debug] > PASS ******
[debug] < 230 Login successful.
[debug] > FEAT
[debug] < 211-Features:
[debug] <  EPRT\r\n EPSV\r\n MDTM\r\n PASV\r\n REST STREAM\r\n SIZE\r\n TVFS\r\n211 End
[debug] > TYPE I
[debug] < 200 Switching to Binary mode.
[trace] transfer from d:\PROGETTI\mywebsite\templates\ddt.xml to /var/www/mywebsite.com/templates/ddt.xml
[debug] > PASV
[debug] < 227 Entering Passive Mode ().
[debug] > LIST -al /var/www/mywebsite.com
[debug] < 150 Here comes the directory listing.
[debug] < 226 Directory send OK.
[debug] > MKD /var/www/mywebsite.com/templates
[debug] < 550 Create directory operation failed.
[debug] > MKD /var/www/mywebsite.com
[debug] < 550 Create directory operation failed.
[debug] > MKD /var/www
[debug] < 550 Create directory operation failed.
[debug] > MKD /var
[debug] < 550 Create directory operation failed.
[debug] > MKD /
[debug] < 550 Create directory operation failed.
[error] Error: Create directory operation failed.
	at makeError (C:\Users\Mattia\.vscode\extensions\liximomo.sftp-1.4.1\node_modules\ftp\lib\connection.js:1067:13)
	at Parser.<anonymous> (C:\Users\Mattia\.vscode\extensions\liximomo.sftp-1.4.1\node_modules\ftp\lib\connection.js:113:25)
	at emitTwo (events.js:126:13)
	at Parser.emit (events.js:214:7)
	at Parser._write (C:\Users\Mattia\.vscode\extensions\liximomo.sftp-1.4.1\node_modules\ftp\lib\parser.js:59:10)
	at doWrite (_stream_writable.js:387:12)
	at writeOrBuffer (_stream_writable.js:373:5)
	at Parser.Writable.write (_stream_writable.js:290:11)
	at Socket.ondata (C:\Users\Mattia\.vscode\extensions\liximomo.sftp-1.4.1\node_modules\ftp\lib\connection.js:273:20)
	at emitOne (events.js:116:13)
	at Socket.emit (events.js:211:7)
	at addChunk (_stream_readable.js:263:12)
	at readableAddChunk (_stream_readable.js:250:11)
	at Socket.Readable.push (_stream_readable.js:208:10)
	at TCP.onread (net.js:594:20)

Please be aware that the folder /var/www/mywebsite.com is already present on remote server, wonder why the script is trying to create it.

@liximomo
Copy link
Owner

liximomo commented Sep 6, 2018

MKD /var/www/mywebsite.com/templates
[debug] < 550 Create directory operation failed.

It can't create templates in folder /var/www/mywebsite.com. And the 550 means Permission Denied (or No such file or folder). So we assume that /var/www/mywebsite.com does not exist and create it first.

Please check your permission since you've confirmed that the folder /var/www/mywebsite.com did exist.

@mattiagalati
Copy link
Author

mattiagalati commented Sep 6, 2018

Further informations:

  • The folder /var/www/mywebsite.com/templates also exists on remote server.
  • The user has permissions to operate on the entire fs (is a root user)
  • Same operation with an FTP client like FileZilla does not trigger any error
  • Remote VSFTP raises Error 550 (tested with FileZilla) when I try to created a folder that is already present, not only for permission denied.

Why the script assumes the folder does not exists? Is my server wrongly configured?

@liximomo
Copy link
Owner

liximomo commented Sep 6, 2018

Please try debug-pacakge.

@mattiagalati
Copy link
Author

Installed debug-package, but the console log is the same:

[info] [file-save] d:\PROGETTI\myproject\core\settings.py
[trace] execute upload for d:\PROGETTI\myproject\core\settings.py
[trace] transfer from d:\PROGETTI\myproject\core\settings.py to /var/www/mywebsite.com/core/settings.py
[debug] > PASV
[debug] < 227 Entering Passive Mode ().
[debug] > LIST -al /var/www/mywebsite.com
[debug] < 150 Here comes the directory listing.
[debug] < 226 Directory send OK.
[debug] > MKD /var/www/mywebsite.com/core
[debug] < 550 Create directory operation failed.
[debug] > MKD /var/www/mywebsite.com
[debug] < 550 Create directory operation failed.
[debug] > MKD /var/www
[debug] < 550 Create directory operation failed.
[debug] > MKD /var
[debug] < 550 Create directory operation failed.
[debug] > MKD /
[debug] < 550 Create directory operation failed.
[error] Error: Create directory operation failed.
	at makeError (C:\Users\Mattia\.vscode\extensions\liximomo.sftp-1.4.1\node_modules\ftp\lib\connection.js:1067:13)
	at Parser.<anonymous> (C:\Users\Mattia\.vscode\extensions\liximomo.sftp-1.4.1\node_modules\ftp\lib\connection.js:113:25)
	at emitTwo (events.js:126:13)
	at Parser.emit (events.js:214:7)
	at Parser._write (C:\Users\Mattia\.vscode\extensions\liximomo.sftp-1.4.1\node_modules\ftp\lib\parser.js:59:10)
	at doWrite (_stream_writable.js:387:12)
	at writeOrBuffer (_stream_writable.js:373:5)
	at Parser.Writable.write (_stream_writable.js:290:11)
	at Socket.ondata (C:\Users\Mattia\.vscode\extensions\liximomo.sftp-1.4.1\node_modules\ftp\lib\connection.js:273:20)
	at emitOne (events.js:116:13)
	at Socket.emit (events.js:211:7)
	at addChunk (_stream_readable.js:263:12)
	at readableAddChunk (_stream_readable.js:250:11)
	at Socket.Readable.push (_stream_readable.js:208:10)
	at TCP.onread (net.js:594:20)

The output seems the same, don't know I I should see something different.

@liximomo
Copy link
Owner

Please try debug-pacakge again. Remember to reload vscode after the installation.

@mattiagalati
Copy link
Author

How can I ensure to have the correctly debug-package and configuration? Is there some log message stating the version used? I suppose to have all correctly configured, but the log is same to the ones posted above.

@liximomo
Copy link
Owner

@mattiagalati Please redownload the debug-pacakge and try again.

@mattiagalati
Copy link
Author

mattiagalati commented Sep 20, 2018

Just installed the debug package v1.5.7, here are the logs:

[info] [file-save] d:\PROGETTI\mywebsite.com\api\call.py
[trace] handle upload file for d:\PROGETTI\mywebsite.com\api\call.py
[debug] < 220 (vsFTPd 3.0.3)
[debug] > USER user
[debug] < 331 Please specify the password.
[debug] > PASS ******
[debug] < 230 Login successful.
[debug] > FEAT
[debug] < 211-Features:
[debug] <  EPRT\r\n EPSV\r\n MDTM\r\n PASV\r\n REST STREAM\r\n SIZE\r\n TVFS\r\n211 End
[debug] > TYPE I
[debug] < 200 Switching to Binary mode.
[trace] transfer from d:\PROGETTI\mywebsite.com\api\call.py to /var/www/mywebsite.com/api/call.py
[debug] > PASV
[debug] < 227 Entering Passive Mode (X,X,X,X,X,X).
[debug] > LIST -al /var/www/mywebsite.com
[debug] < 150 Here comes the directory listing.
[debug] < 226 Directory send OK.
[debug] > MKD /var/www/mywebsite.com/api
[debug] < 550 Create directory operation failed.
[debug] > MKD /var/www/mywebsite.com
[debug] < 550 Create directory operation failed.
[debug] > MKD /var/www
[debug] < 550 Create directory operation failed.
[debug] > MKD /var
[debug] < 550 Create directory operation failed.
[debug] > MKD /
[debug] < 550 Create directory operation failed.
[error] Error: Create directory operation failed.
	at makeError (C:\Users\Mattia\.vscode\extensions\liximomo.sftp-1.5.7\node_modules\ftp\lib\connection.js:1067:13)
	at Parser.<anonymous> (C:\Users\Mattia\.vscode\extensions\liximomo.sftp-1.5.7\node_modules\ftp\lib\connection.js:113:25)
	at emitTwo (events.js:126:13)
	at Parser.emit (events.js:214:7)
	at Parser._write (C:\Users\Mattia\.vscode\extensions\liximomo.sftp-1.5.7\node_modules\ftp\lib\parser.js:59:10)
	at doWrite (_stream_writable.js:387:12)
	at writeOrBuffer (_stream_writable.js:373:5)
	at Parser.Writable.write (_stream_writable.js:290:11)
	at Socket.ondata (C:\Users\Mattia\.vscode\extensions\liximomo.sftp-1.5.7\node_modules\ftp\lib\connection.js:273:20)
	at emitOne (events.js:116:13)
	at Socket.emit (events.js:211:7)
	at addChunk (_stream_readable.js:263:12)
	at readableAddChunk (_stream_readable.js:250:11)
	at Socket.Readable.push (_stream_readable.js:208:10)
	at TCP.onread (net.js:594:20) upload d:\PROGETTI\mywebsite.com\api\call.py

Compared logs for same and previous version, which uploads files to another server, just after the

[debug] < 150 Here comes the directory listing.
[debug] < 226 Directory send OK.

it proceed with STORE command and correctly uploads file.
I really think there is something wrong with the ftp server configuration, but the log does not provide any information about the need to create the folder, which indeed is already there.

Tried another FTP upload extension (FTP-Sync) and works as expected.

@liximomo
Copy link
Owner

liximomo commented Sep 20, 2018

@mattiagalati This is not the debug package! Don not upgrade after install debug package. I've changed the debug version name. So It will not conflict with the normal one. Download the new debug-pacakge and Install it after uninstall sftp.

@mattiagalati
Copy link
Author

Sorry, my fault. Don't know why my VSCode falled back into classical version instead of debug one.
Now I installed the debug version 1.0.0 and this is the console log:

[debug] This is a debug version
[info] config at d:\PROGETTI\mywebsite.com {...}
[info] [file-save] d:\PROGETTI\mywebsite.com\api\auth.py
[trace] handle upload file for d:\PROGETTI\mywebsite.com\api\auth.py
[debug] < 220 (vsFTPd 3.0.3)
[debug] > USER user
[debug] < 331 Please specify the password.
[debug] > PASS ******
[debug] < 230 Login successful.
[debug] > FEAT
[debug] < 211-Features:
[debug] <  EPRT\r\n EPSV\r\n MDTM\r\n PASV\r\n REST STREAM\r\n SIZE\r\n TVFS\r\n211 End
[debug] > TYPE I
[debug] < 200 Switching to Binary mode.
[trace] transfer from d:\PROGETTI\mywebsite.com\api\auth.py to /var/www/mywebsite.com/api/auth.py
[debug] > PASV
[debug] < 227 Entering Passive Mode ().
[debug] > LIST -al /var/www/mywebsite.com
[debug] < 150 Here comes the directory listing.
[debug] < 226 Directory send OK.
[debug] /var/www/mywebsite.com/api not exist
[debug] > MKD /var/www/mywebsite.com/api
[debug] < 550 Create directory operation failed.
[debug] /var/www/mywebsite.com not exist
[debug] > MKD /var/www/mywebsite.com
[debug] < 550 Create directory operation failed.
[debug] /var/www not exist
[debug] > MKD /var/www
[debug] < 550 Create directory operation failed.
[debug] /var not exist
[debug] > MKD /var
[debug] < 550 Create directory operation failed.
[debug] / not exist
[debug] > MKD /
[debug] < 550 Create directory operation failed.
[error] Error: Create directory operation failed.
	at makeError (C:\Users\Mattia\.vscode\extensions\liximomo.sftp-debug-1.0.0\node_modules\ftp\lib\connection.js:1067:13)
	at Parser.<anonymous> (C:\Users\Mattia\.vscode\extensions\liximomo.sftp-debug-1.0.0\node_modules\ftp\lib\connection.js:113:25)
	at emitTwo (events.js:126:13)
	at Parser.emit (events.js:214:7)
	at Parser._write (C:\Users\Mattia\.vscode\extensions\liximomo.sftp-debug-1.0.0\node_modules\ftp\lib\parser.js:59:10)
	at doWrite (_stream_writable.js:387:12)
	at writeOrBuffer (_stream_writable.js:373:5)
	at Parser.Writable.write (_stream_writable.js:290:11)
	at Socket.ondata (C:\Users\Mattia\.vscode\extensions\liximomo.sftp-debug-1.0.0\node_modules\ftp\lib\connection.js:273:20)
	at emitOne (events.js:116:13)
	at Socket.emit (events.js:211:7)
	at addChunk (_stream_readable.js:263:12)
	at readableAddChunk (_stream_readable.js:250:11)
	at Socket.Readable.push (_stream_readable.js:208:10)
	at TCP.onread (net.js:594:20) upload d:\PROGETTI\mywebsite.com\api\auth.py

@liximomo
Copy link
Owner

liximomo commented Sep 21, 2018

Great! I've had some clues from the log. There are some errors occurring when parsing the response of LIST command. I've added some new log points. Please download the new debug-pacakge and try it.

@mattiagalati
Copy link
Author

Here you are.
The file is now correctly uploaded.

[debug] This is a debug version
[trace] run command 'Upload File'
[trace] handle upload file for d:\PROGETTI\mywebsite.com\api\auth.py
[debug] < 220 (vsFTPd 3.0.3)
[debug] > USER user
[debug] < 331 Please specify the password.
[debug] > PASS ******
[debug] < 230 Login successful.
[debug] > FEAT
[debug] < 211-Features:
[debug] <  EPRT\r\n EPSV\r\n MDTM\r\n PASV\r\n REST STREAM\r\n SIZE\r\n TVFS\r\n211 End
[debug] > TYPE I
[debug] < 200 Switching to Binary mode.
[trace] transfer from d:\PROGETTI\mywebsite.com\api\auth.py to /var/www/mywebsite.com/api/auth.py
[debug] > PASV
[debug] < 227 Entering Passive Mode ().
[debug] > LIST -al /var/www/mywebsite.com
[debug] < 150 Here comes the directory listing.
[debug] < 226 Directory send OK.
[debug] list /var/www/mywebsite.com: [{"type":"d","name":".","sticky":false,"rights":{"user":"rwx","group":"rwx","other":"rwx"},"acl":false,"owner":"ftp","group":"ftp","size":4096,"date":"2018-09-20T23:34:00.000Z"},{"type":"d","name":"..","sticky":false,"rights":{"user":"rwx","group":"rx","other":"rx"},"acl":false,"owner":"ftp","group":"ftp","size":4096,"date":"2018-06-12T11:23:00.000Z"},{"type":"-","name":".gitignore","sticky":false,"rights":{"user":"rwx","group":"rwx","other":"rwx"},"acl":false,"owner":"ftp","group":"ftp","size":38,"date":"2018-09-07T07:58:00.000Z"},{"type":"-","name":"1529423237.9094296.pdf","sticky":false,"rights":{"user":"rwx","group":"rwx","other":"rwx"},"acl":false,"owner":"ftp","group":"ftp","size":2321,"date":"2018-06-19T13:47:00.000Z"},{"type":"-","name":"README.md","sticky":false,"rights":{"user":"rwx","group":"rwx","other":"rwx"},"acl":false,"owner":"ftp","group":"ftp","size":2872,"date":"2018-09-07T07:58:00.000Z"},{"type":"d","name":"__pycache__","sticky":false,"rights":{"user":"rwx","group":"rwx","other":"rwx"},"acl":false,"owner":"ftp","group":"ftp","size":4096,"date":"2018-09-07T07:59:00.000Z"},{"type":"d","name":"api","sticky":false,"rights":{"user":"rwx","group":"rwx","other":"rwx"},"acl":false,"owner":"ftp","group":"ftp","size":4096,"date":"2018-09-13T08:18:00.000Z"},{"type":"-","name":"auxilia_dev.service","sticky":false,"rights":{"user":"rwx","group":"rwx","other":"rwx"},"acl":false,"owner":"ftp","group":"ftp","size":503,"date":"2018-09-07T07:58:00.000Z"},{"type":"-","name":"auxilia_prod.service","sticky":false,"rights":{"user":"rwx","group":"rwx","other":"rwx"},"acl":false,"owner":"ftp","group":"ftp","size":846,"date":"2018-09-17T04:55:00.000Z"},{"type":"d","name":"core","sticky":false,"rights":{"user":"rwx","group":"rwx","other":"rwx"},"acl":false,"owner":"ftp","group":"ftp","size":4096,"date":"2018-05-31T07:02:00.000Z"},{"type":"d","name":"env","sticky":false,"rights":{"user":"rwx","group":"rwx","other":"rwx"},"acl":false,"owner":"ftp","group":"ftp","size":4096,"date":"2018-06-19T13:39:00.000Z"},{"type":"-","name":"gserviceaccount_dev.json","sticky":false,"rights":{"user":"rwx","group":"rwx","other":"rwx"},"acl":false,"owner":"ftp","group":"ftp","size":2365,"date":"2018-09-07T07:58:00.000Z"},{"type":"-","name":"gserviceaccount_prod.json","sticky":false,"rights":{"user":"rwx","group":"rwx","other":"rwx"},"acl":false,"owner":"ftp","group":"ftp","size":2353,"date":"2018-09-07T07:58:00.000Z"},{"type":"-","name":"requirements.txt","sticky":false,"rights":{"user":"rwx","group":"rwx","other":"rwx"},"acl":false,"owner":"ftp","group":"ftp","size":300,"date":"2018-09-07T07:58:00.000Z"},{"type":"d","name":"static","sticky":false,"rights":{"user":"rwx","group":"rwx","other":"rwx"},"acl":false,"owner":"ftp","group":"ftp","size":4096,"date":"2018-09-06T06:03:00.000Z"},{"type":"d","name":"templates","sticky":false,"rights":{"user":"rwx","group":"rwx","other":"rwx"},"acl":false,"owner":"ftp","group":"ftp","size":4096,"date":"2018-09-06T06:59:00.000Z"},{"type":"d","name":"views","sticky":false,"rights":{"user":"rwx","group":"rwx","other":"rwx"},"acl":false,"owner":"ftp","group":"ftp","size":4096,"date":"2018-06-11T08:56:00.000Z"},{"type":"-","name":"virtualhost_dev","sticky":false,"rights":{"user":"rwx","group":"rwx","other":"rwx"},"acl":false,"owner":"ftp","group":"ftp","size":1680,"date":"2018-09-07T07:58:00.000Z"},{"type":"-","name":"virtualhost_prod","sticky":false,"rights":{"user":"rwx","group":"rwx","other":"rwx"},"acl":false,"owner":"ftp","group":"ftp","size":1672,"date":"2018-09-07T07:58:00.000Z"},{"type":"-","name":"wsgi.py","sticky":false,"rights":{"user":"rwx","group":"rwx","other":"rwx"},"acl":false,"owner":"ftp","group":"ftp","size":154,"date":"2018-09-07T07:58:00.000Z"},"srwxrwxrwx    1 ftp      ftp             0 Sep 21 01:34 wsgi.sock"]
[debug] make FileEntry for {"type":"-","name":".gitignore","sticky":false,"rights":{"user":"rwx","group":"rwx","other":"rwx"},"acl":false,"owner":"ftp","group":"ftp","size":38,"date":"2018-09-07T07:58:00.000Z"}
[debug] stat.date: "2018-09-07T07:58:00.000Z" type: [object Date]
[debug] make FileEntry for {"type":"-","name":"1529423237.9094296.pdf","sticky":false,"rights":{"user":"rwx","group":"rwx","other":"rwx"},"acl":false,"owner":"ftp","group":"ftp","size":2321,"date":"2018-06-19T13:47:00.000Z"}
[debug] stat.date: "2018-06-19T13:47:00.000Z" type: [object Date]
[debug] make FileEntry for {"type":"-","name":"README.md","sticky":false,"rights":{"user":"rwx","group":"rwx","other":"rwx"},"acl":false,"owner":"ftp","group":"ftp","size":2872,"date":"2018-09-07T07:58:00.000Z"}
[debug] stat.date: "2018-09-07T07:58:00.000Z" type: [object Date]
[debug] make FileEntry for {"type":"d","name":"__pycache__","sticky":false,"rights":{"user":"rwx","group":"rwx","other":"rwx"},"acl":false,"owner":"ftp","group":"ftp","size":4096,"date":"2018-09-07T07:59:00.000Z"}
[debug] stat.date: "2018-09-07T07:59:00.000Z" type: [object Date]
[debug] make FileEntry for {"type":"d","name":"api","sticky":false,"rights":{"user":"rwx","group":"rwx","other":"rwx"},"acl":false,"owner":"ftp","group":"ftp","size":4096,"date":"2018-09-13T08:18:00.000Z"}
[debug] stat.date: "2018-09-13T08:18:00.000Z" type: [object Date]
[debug] make FileEntry for {"type":"-","name":"auxilia_dev.service","sticky":false,"rights":{"user":"rwx","group":"rwx","other":"rwx"},"acl":false,"owner":"ftp","group":"ftp","size":503,"date":"2018-09-07T07:58:00.000Z"}
[debug] stat.date: "2018-09-07T07:58:00.000Z" type: [object Date]
[debug] make FileEntry for {"type":"-","name":"auxilia_prod.service","sticky":false,"rights":{"user":"rwx","group":"rwx","other":"rwx"},"acl":false,"owner":"ftp","group":"ftp","size":846,"date":"2018-09-17T04:55:00.000Z"}
[debug] stat.date: "2018-09-17T04:55:00.000Z" type: [object Date]
[debug] make FileEntry for {"type":"d","name":"core","sticky":false,"rights":{"user":"rwx","group":"rwx","other":"rwx"},"acl":false,"owner":"ftp","group":"ftp","size":4096,"date":"2018-05-31T07:02:00.000Z"}
[debug] stat.date: "2018-05-31T07:02:00.000Z" type: [object Date]
[debug] make FileEntry for {"type":"d","name":"env","sticky":false,"rights":{"user":"rwx","group":"rwx","other":"rwx"},"acl":false,"owner":"ftp","group":"ftp","size":4096,"date":"2018-06-19T13:39:00.000Z"}
[debug] stat.date: "2018-06-19T13:39:00.000Z" type: [object Date]
[debug] make FileEntry for {"type":"-","name":"gserviceaccount_dev.json","sticky":false,"rights":{"user":"rwx","group":"rwx","other":"rwx"},"acl":false,"owner":"ftp","group":"ftp","size":2365,"date":"2018-09-07T07:58:00.000Z"}
[debug] stat.date: "2018-09-07T07:58:00.000Z" type: [object Date]
[debug] make FileEntry for {"type":"-","name":"gserviceaccount_prod.json","sticky":false,"rights":{"user":"rwx","group":"rwx","other":"rwx"},"acl":false,"owner":"ftp","group":"ftp","size":2353,"date":"2018-09-07T07:58:00.000Z"}
[debug] stat.date: "2018-09-07T07:58:00.000Z" type: [object Date]
[debug] make FileEntry for {"type":"-","name":"requirements.txt","sticky":false,"rights":{"user":"rwx","group":"rwx","other":"rwx"},"acl":false,"owner":"ftp","group":"ftp","size":300,"date":"2018-09-07T07:58:00.000Z"}
[debug] stat.date: "2018-09-07T07:58:00.000Z" type: [object Date]
[debug] make FileEntry for {"type":"d","name":"static","sticky":false,"rights":{"user":"rwx","group":"rwx","other":"rwx"},"acl":false,"owner":"ftp","group":"ftp","size":4096,"date":"2018-09-06T06:03:00.000Z"}
[debug] stat.date: "2018-09-06T06:03:00.000Z" type: [object Date]
[debug] make FileEntry for {"type":"d","name":"templates","sticky":false,"rights":{"user":"rwx","group":"rwx","other":"rwx"},"acl":false,"owner":"ftp","group":"ftp","size":4096,"date":"2018-09-06T06:59:00.000Z"}
[debug] stat.date: "2018-09-06T06:59:00.000Z" type: [object Date]
[debug] make FileEntry for {"type":"d","name":"views","sticky":false,"rights":{"user":"rwx","group":"rwx","other":"rwx"},"acl":false,"owner":"ftp","group":"ftp","size":4096,"date":"2018-06-11T08:56:00.000Z"}
[debug] stat.date: "2018-06-11T08:56:00.000Z" type: [object Date]
[debug] make FileEntry for {"type":"-","name":"virtualhost_dev","sticky":false,"rights":{"user":"rwx","group":"rwx","other":"rwx"},"acl":false,"owner":"ftp","group":"ftp","size":1680,"date":"2018-09-07T07:58:00.000Z"}
[debug] stat.date: "2018-09-07T07:58:00.000Z" type: [object Date]
[debug] make FileEntry for {"type":"-","name":"virtualhost_prod","sticky":false,"rights":{"user":"rwx","group":"rwx","other":"rwx"},"acl":false,"owner":"ftp","group":"ftp","size":1672,"date":"2018-09-07T07:58:00.000Z"}
[debug] stat.date: "2018-09-07T07:58:00.000Z" type: [object Date]
[debug] make FileEntry for {"type":"-","name":"wsgi.py","sticky":false,"rights":{"user":"rwx","group":"rwx","other":"rwx"},"acl":false,"owner":"ftp","group":"ftp","size":154,"date":"2018-09-07T07:58:00.000Z"}
[debug] stat.date: "2018-09-07T07:58:00.000Z" type: [object Date]
[debug] make FileEntry for srwxrwxrwx    1 ftp      ftp             0 Sep 21 01:34 wsgi.sock
[error] TypeError: Path must be a string. Received undefined
	at assertPath (path.js:28:11)
	at Object.join (path.js:501:7)
	at Object.join (C:\Users\Mattia\.vscode\extensions\liximomo.sftp-debug-1.0.0\node_modules\upath\build\code\upath.js:51:33)
	at stats.filter.map.item (C:\Users\Mattia\.vscode\extensions\liximomo.sftp-debug-1.0.0\out\src\core\fs\ftpFileSystem.js:197:63)
	at Array.map (<anonymous>)
	at FTPFileSystem.<anonymous> (C:\Users\Mattia\.vscode\extensions\liximomo.sftp-debug-1.0.0\out\src\core\fs\ftpFileSystem.js:194:82)
	at Generator.next (<anonymous>)
	at fulfilled (C:\Users\Mattia\.vscode\extensions\liximomo.sftp-debug-1.0.0\out\src\core\fs\ftpFileSystem.js:4:58)
	at <anonymous>
[debug] /var/www/mywebsite.com/api exist, type: 1
[debug] > PASV
[debug] < 227 Entering Passive Mode ().
[debug] > STOR /var/www/mywebsite.com/api/auth.py
[debug] < 150 Ok to send data.
[debug] < 226 Transfer complete.
[info] transfer d:\PROGETTI\mywebsite.com\api\auth.py

@liximomo
Copy link
Owner

liximomo commented Sep 21, 2018

So the problem is the wsgi.sock file. I've made a fix-package for you now and I will make a release in a few days. Remember to uninstall the debug version.

@mattiagalati
Copy link
Author

The fix package resolve the problem.
Many thanks.

Please just keep in mind that the file you mentioned "wsgi.sock" does not show in remote explorer sidebar when I expand the root.
Thats not a big issue for me, since the file is automatically created on remote machine, but not being aware of its presence can be misleading for someone.

@liximomo liximomo changed the title Error: Create directory operation failed ftp failed to work with .sock file Sep 25, 2018
@liximomo
Copy link
Owner

Fixed in v1.5.8.

@osix
Copy link

osix commented Apr 24, 2019

@liximomo Unfortunately I faced the same issue.

Steps to reproduce

  1. Create a file with the following content:
{
  "name": "name",
  "protocol": "ftp",
  "host": "here_is_the_real_host_name",
  "port": 21,
  "username": "user",
  "password": "pass",
  "remotePath": "/",
  "uploadOnSave": true,
  "ignore": [".vscode", ".git", ".DS_Store"]
}
  1. Update some files
  2. Try to run a Sync Local -> Remote

Extension Logs

[error] Error: Create directory operation failed.
at v (/home/os/.vscode/extensions/liximomo.sftp-1.12.2/dist/extension.js:70:110347)
    at d.<anonymous> (/home/os/.vscode/extensions/liximomo.sftp-1.12.2/dist/extension.js:70:111070)
    at d.emit (events.js:182:13)
    at d.module.exports.d._write (/home/os/.vscode/extensions/liximomo.sftp-1.12.2/dist/extension.js:70:123892)
    at doWrite (_stream_writable.js:410:12)
    at writeOrBuffer (_stream_writable.js:394:5)
    at d.Writable.write (_stream_writable.js:294:11)
    at Socket.p (/home/os/.vscode/extensions/liximomo.sftp-1.12.2/dist/extension.js:70:113441)
    at Socket.emit (events.js:182:13)
    at addChunk (_stream_readable.js:279:12)
    at readableAddChunk (_stream_readable.js:264:11)
    at Socket.Readable.push (_stream_readable.js:219:10)
    at TCP.onread (net.js:636:20) 

Specifications

  • Version: 1.12.2
  • Platform: Linux 4.19.34-1-MANJARO

Additional Notes

I've fixed the coding style for about 200+ files and tried to sync the local changes to the remote host, but getting the mentioned above error. I suppose, that the fix should already be in the 1.12.2, but maybe that doesn't work for Linux.
Worth to note, that usual editing is working as is, i.e. edit one file and save it. After that the file is being updated on the host appropriately.

@A2DNEW
Copy link

A2DNEW commented May 12, 2020

@liximomo i have same error only for one folder with 1.12.9 version

[05-12 16:32:11] [trace] handle upload file for /Users/mohammad/Library/Mobile Documents/com~apple~CloudDocs/Waiting/xz/lib/arrays.php
[05-12 16:32:11] [debug] > PASV
[05-12 16:32:11] [debug] < '227 Entering Passive Mode (185,120,222,225,202,104).\r\n'
[05-12 16:32:11] [debug] > LIST /
[05-12 16:32:11] [debug] < '150 Opening BINARY mode data connection for file list\r\n'
[05-12 16:32:11] [debug] < '226 Transfer complete\r\n'
[05-12 16:32:11] [debug] > PASV
[05-12 16:32:11] [debug] < '227 Entering Passive Mode (185,120,222,225,196,252).\r\n'
[05-12 16:32:11] [debug] > STOR /lib/arrays.php
[05-12 16:32:11] [debug] < '550 /lib/arrays.php: Permission denied\r\n'
[05-12 16:32:11] [error] Error: /lib/arrays.php: Permission denied

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

4 participants