Smart Processes Management
FTP executor for Runnerty:
npm i @runnerty/executor-ftp
{
"id": "ftp_default",
"type": "@runnerty-executor-ftp",
"host": "host.com",
"port": "21",
"username": "user",
"password": "1234"
}
{
"id": "ftp_default",
"type": "@runnerty-executor-ftp",
"host": "host.com",
"port": "21",
"username": "user",
"privateKeyPath": "/privateKeys/myPrivateKey.pem"
}
Notas:
- Puedes usar
username
ouser
en la configuración; internamente se normaliza ausername
. - Si usas autenticación por clave, utiliza
privateKeyPath
(ruta a fichero PEM) oprivateKey
(contenido PEM). SiprivateKey
apunta a un fichero existente, se leerá automáticamente.
{
"id": "ftp_default",
"command": "PUT",
"sourcePath": "./sample.txt",
"destinationPath": "/remote/sample_file.txt"
}
{
"id": "ftp_default",
"command": "LIST",
"sourcePath": "./remoteDir/"
}
Connection config you will see here
- get: download a file.
- put: upload a file.
- mkdir: create a new directory.
- rmdir: remove the directory or file.
- delete: delete file.
- rename: rename sourcePath to destinationPath.
- chmod: modify rights to destinationPath file.
- list: retrieves a directory listing.
PROCESS_EXEC_DATA_OUTPUT
: Response output data.EXTRA_DATA
: It is possible to work with the parsed values of the response.
LIST
command return a JSON with this properties:
type: // file type(-, d, l)
name: // file name
size: // file size
modifyTime: // file timestamp of modified time
accessTime: // file timestamp of access time
rights: {
user:
group:
other:
},
owner: // user ID
group: // group ID