SMB2 using smbclient icon

SMB2 using smbclient

Interact with SMB shares using the smbclient CLI

Overview

This node interacts with SMB shares using the smbclient CLI, allowing users to perform various file operations on SMB shares such as downloading files, deleting files, listing directories, creating and removing directories, getting file metadata, and uploading files. It is useful in scenarios where automation workflows need to access or manipulate files on SMB network shares, for example, downloading a report file from a shared folder or uploading logs to a network share.

Use Case Examples

  1. Downloading a file from an SMB share to use in further processing in a workflow.
  2. Listing the contents of a directory on an SMB share to trigger actions based on file presence.
  3. Uploading a file to an SMB share as part of a backup or data transfer process.

Properties

Name Meaning
Smbclient Path Custom path to smbclient binary, if not in PATH.
Remote Path The path on the SMB share to operate on, used for operations like get, put, stat, and delete.
Binary Property (Output) The name of the binary property in the output where the downloaded file data will be stored.
File Name (Output) The name to assign to the downloaded file in the output.
MIME Type (Output) The MIME type to assign to the downloaded file in the output.

Output

Binary

Contains the binary data of the downloaded file when performing the 'Get File' operation.

JSON

  • index - Each item in the output array corresponds to the result of an SMB operation for each input item.

Dependencies

  • Requires smbclient CLI installed and accessible, or a custom path to smbclient binary provided.
  • Requires SMB2 API credentials for authentication to the SMB share.

Troubleshooting

  • Common issues include incorrect smbclient path, invalid SMB credentials, or network connectivity problems to the SMB share.
  • Errors like 'Unsupported operation' occur if an invalid operation is specified.
  • File not found or permission denied errors may occur if the remote path is incorrect or access rights are insufficient.

Discussion