SMB2 using smbclient icon

SMB2 using smbclient

Interact with SMB shares using the smbclient CLI

Overview

This node allows interaction with SMB shares using the smbclient CLI, supporting operations such as uploading files, downloading files, listing directories, creating and removing directories, deleting files, and retrieving file or folder metadata. It is useful for automating file management tasks on SMB network shares, such as backing up files, synchronizing data, or managing remote directories.

Use Case Examples

  1. Uploading a file to an SMB share from binary data or text content.
  2. Downloading a file from an SMB share and processing it in a workflow.
  3. Listing the contents of a directory on an SMB share to trigger further actions based on file presence.

Properties

Name Meaning
Smbclient Path Custom path to the smbclient binary if it is not in the system PATH.
Remote Path The path on the SMB share where the operation will be performed (e.g., file or directory path).
Source Specifies the source type for uploading a file, either from a binary property or text content.
Binary Property The name of the binary property containing the file data to upload when the source is binary.
Text Content The text content to upload as a file when the source is text.

Output

JSON

  • fileName - Name of the file involved in the operation (e.g., uploaded or downloaded file).
  • fileSize - Size of the file in bytes, if applicable.
  • filePath - Full path of the file on the SMB share.
  • fileMetadata - Metadata information about the file or folder, such as attributes and timestamps.

Dependencies

  • Requires smbclient CLI installed and accessible, optionally specifying a custom path.

Troubleshooting

  • Common issues include incorrect smbclient path, authentication failures, or network connectivity problems to the SMB share.
  • Errors may occur if the specified remote path does not exist or permissions are insufficient.
  • Ensure the binary property name matches the actual binary data property when uploading files from binary.
  • Check that text content is provided when uploading from text source.

Links

Discussion