Skip to main content
Version: 2.5.0

SMB SMB / CIFS Integration Guide

The SMB connector lets MaestroHub read and write files on a remote Windows or Samba network share over TCP/445 — without needing a privileged sidecar like mount.cifs. It is built for the common "industrial file drop" pattern: a PLC, MES, or third‑party tool drops CSV / JSON / XML / binary files onto a shared folder, and a MaestroHub pipeline picks them up, transforms them, and pushes the result somewhere else.

Overview

The SMB connector provides:

  • Native SMB 2.1 / 3.0 / 3.1.1 over TCP/445 — no kernel mount required.
  • NTLM and anonymous (guest) authentication, with optional domain / workgroup.
  • Pattern‑based file discovery — literal names, glob wildcards (*, ?), or full regex.
  • Recursive search for fetching nested files by bare name.
  • Atomic writes (temp‑file + rename) for safe hand‑off to other readers.
  • BOM detection on read and encoding control on write (utf-8, utf-8-bom, utf-16le, utf-16be, binary, auto).
  • SMB message signing enforcement — refuse the connection unless the server agrees to sign every message (integrity guarantee; not confidentiality).
  • Idle reconnect — silently re‑mounts after long idle periods (Windows commonly drops sessions after ~15 min).
  • Path‑traversal guard scoped to the configured base path; .. traversal is rejected.
  • Configurable size cap per call (default 25 MB, up to 256 MB).

Connection Configuration

Creating an SMB / CIFS Connection

Navigate to ConnectionsNew ConnectionSMB / CIFS. The form is organized into tabs: Connection, Authentication, Security, Advanced, Limits, Functions, and Health.

1. Profile Information

FieldDefaultDescription
Profile NameDescriptive name for this connection (required, max 100 chars, unique).
DescriptionOptional free‑text description.

2. Connection Settings

FieldDefaultDescription
HostSMB server hostname or IP (e.g., file-server.corp.local or 192.168.1.10). Required.
Port445TCP port. The SMB standard is 445; only change for non‑standard installs.
Share NameShare name to mount (e.g., shared, public, data). Required.
Base Path(empty)Optional path inside the share. All file operations are scoped under this path — paths typed in functions are interpreted relative to it, and .. cannot escape it.
Base Path as a security boundary

If a connection is intended for a single inbound folder, set Base Path to inbound (or similar). Functions on this connection then cannot read or write outside that subtree, even if a templated path tries to traverse up.

3. Authentication Settings

FieldDefaultDescription
UsernameNTLM username. Leave empty for anonymous / guest access.
PasswordNTLM password (stored as a secret). Leave empty for anonymous access.
Domain / WorkgroupOptional NTLM domain or workgroup (e.g., CORP).

4. Security

FieldDefaultDescription
Require Message SigningfalseWhen on, the connection is rejected unless the server agrees to sign every SMB message. Signing protects against tampering on the wire — it is an integrity guarantee, not a confidentiality one. Supported by every modern SMB 2.x / 3.x server.
Signing is not encryption

Signing detects tampering but does not encrypt SMB payloads. The connector cannot enforce SMB 3 encryption today — the underlying library does not expose the negotiated encryption flag, so a toggle here would be unverifiable. If you need confidentiality, protect the network path with a VPN, IPsec tunnel, or segmentation, and track the project's follow-up for native encryption enforcement.

5. Advanced

FieldDefaultDescription
Connect Timeout (s)10How long to wait for the initial TCP + SMB handshake before failing. Range 1–120.
Operation Timeout (s)60Default per‑call timeout when the function doesn't override it. Range 1–600.
Idle Reconnect Threshold (s)600If the connection has been idle longer than this, the next operation silently re‑mounts the share before running. Windows servers commonly drop idle sessions after ~15 min. Range 60–3600.

6. Limits

FieldDefaultDescription
Discovery Limit2000Maximum files scanned while resolving a wildcard / regex pattern. Range 1–100,000.
Max File Size (MB)25Maximum size for reads and writes. Files larger than this are rejected. Range 1–256.

7. Health Check

Health checks periodically verify the server is reachable.

FieldDefaultDescription
Enable Health ChecktruePeriodically verify the connection is healthy.
Check Interval (ms)30000How often health checks run.
Retry Count1Number of retries for a failed health check before marking the connection unhealthy.

8. Connection Labels

FieldDefaultDescription
LabelsKey‑value pairs to categorize the connection (max 10).

Example Labels

  • environment: production
  • purpose: order-import
  • partner: acme-corp
  • site: plant-3

Function Builder

Creating SMB Functions

After saving the connection:

  1. Open the connection and switch to the Functions tab.
  2. Click New Function — the type picker shows five SMB function types.
  3. Fill the Basic tab (name, description, labels) and the Configuration tab.
  4. Click Test to run the function once against the live server.
SMB function type selection

SMB function types: Fetch, Write, List, Delete, Move

The five function types are:

FunctionIDCategoryPurpose
Fetch Filesmb.fetch.filereadRead a file (literal, wildcard, or regex match).
Write Filesmb.write.filewriteCreate, append, or overwrite a file with optional encoding.
List Directorysmb.list.directoryreadList files / folders, optionally recursive, optionally pattern‑filtered.
Delete Filesmb.delete.filewriteDelete a single file (directories are intentionally not supported).
Move / Rename Filesmb.move.filewriteServer‑atomic move within the share.

Fetch File (smb.fetch.file)

Purpose: Read one file from the share. Supports literal names, glob wildcards (*, ?), and regex. Returns the content as base64 (default) or as a UTF‑8 text string.

Configuration

FieldTypeRequiredDefaultDescription
File NamestringYesFile name or pattern relative to Base Path. Literal (report.csv), glob (data_*.csv), or regex (log_[0-9]{8}\.txt). Supports ((placeholder)) templates.
RecursivebooleanNofalseWhen on, the walk descends into subdirectories. Bare names like nested.csv are matched by basename at any depth; patterns containing / are matched against the basePath‑relative path.
Output FormatenumNobase64base64 — safe for any file (CSV, JSON, binary). text — returns the decoded UTF‑8 string; fails if the file is not valid UTF‑8. Use text to save the 33% base64 inflation on CSV/JSON.
Timeout (ms)intNo60000Per‑call override of the connection's operation timeout. Range 100–600,000.
Max File Size (MB)intNo(connection default)Per‑call override. Range 1–256.
Discovery LimitintNo(connection default)Per‑call override. Range 1–100,000.

Pattern matching cheat sheet

PatternInterpreted asMatches
report.csvLiteralexactly report.csv under Base Path
sub/report.csvLiteral with separatorexactly sub/report.csv under Base Path
data_*.csvGlob (wildcard)any data_…csv at depth 0 (non‑recursive) or any depth (recursive)
data_???.csvGlobmatches data_001.csv, data_002.csv, …
log_[0-9]{8}\.txtRegex (any of [ ] ( ) ^ $ | + triggers regex mode)files like log_20260115.txt
nested.csv + RecursiveBare literal + recursivethe first nested.csv found at any depth
^sub/report\.csv$ + RecursiveRegex with / + recursiveonly the file at exactly sub/report.csv

When multiple files match, the alphabetically last is returned (the "latest‑by‑name" convention — works well with date‑stamped filenames like data_2026-01-15.csv).

Output structure (function level)

{
"data": "aWQsbmFtZSx2YWx1ZQoxLGFscGhhLDEwMAo...",
"metadata": {
"fileName": "data_2026-01-15.csv",
"filePath": "inbound/data_2026-01-15.csv",
"fileType": "csv",
"sizeBytes": 2048,
"lastModified": "2026-01-15T08:30:00Z",
"discoveryPattern": "data_*.csv",
"outputFormat": "base64",
"encodingHint": "utf-8-bom"
}
}
FieldTypeDescription
datastringFile content. base64‑encoded when outputFormat=base64, raw UTF‑8 string when outputFormat=text. With text mode and a UTF‑8 BOM source, the BOM is stripped automatically.
metadata.fileNamestringBasename of the resolved file (after pattern matching).
metadata.filePathstringFull share‑relative path of the resolved file.
metadata.fileTypestringFile extension without the leading dot (csv, json, txt, …). Empty string if the file has no extension.
metadata.sizeBytesnumberFile size on disk in bytes.
metadata.lastModifiedstringRFC 3339 / ISO 8601 UTC timestamp of the file's last modification.
metadata.discoveryPatternstringEffective pattern used during discovery (literal or compiled regex). Useful for debugging templated patterns.
metadata.outputFormatstringbase64 or text — echoes the request so downstream nodes can branch on it.
metadata.encodingHintstringOptional. Present when the file begins with a recognized BOM: utf-8-bom, utf-16le-bom, utf-16be-bom. Absent otherwise.

Use cases

  • Fetch the latest daily export by date pattern: data_*.csv → "latest by name".
  • Pull a fixed report by name: report.csv.
  • Find a file dropped in a deep folder by name only: report.csv + Recursive.
  • Validate file format with regex: log_[0-9]{8}\.txt.

Write File (smb.write.file)

Purpose: Write content to the share. Supports create, overwrite, append, and binary writes. Writes are atomic when not appending — content lands in a temp file and is renamed onto the target, so concurrent readers always see either the old file or the new file, never a partial.

Configuration

FieldTypeRequiredDefaultDescription
File NamestringYesDestination file path relative to Base Path. Subdirectories are created on demand (see Create File). Supports ((placeholder)) templates.
DatastringYesFile content. Written verbatim by default; set Input Format to base64 if the field carries a base64-encoded payload. Supports ((placeholder)).
Input FormatenumNotextHow Data is interpreted. text (default) writes the string verbatim as UTF-8 bytes. base64 strict-decodes the string first — pick this for binary files. Invalid base64 fails the call rather than silently writing the literal text.
Create FilebooleanNotrueWhen on, parent directories and the file are created if missing. When off, the call fails if the file doesn't already exist.
Append to FilebooleanNofalseWhen on, appends to the existing file (or creates it if Create File is on). Mutually exclusive with Overwrite Existing.
Append NewlinebooleanNotrueWhen appending, insert a \n before the new data if the file is non‑empty.
Overwrite ExistingbooleanNofalseWhen on, an existing target is replaced. When off and the file exists, a timestamped variant is written (e.g., report-20260115T083000Z.csv) so nothing is lost.
EncodingenumNoutf-8Output encoding / BOM prefix. utf-8, utf-8-bom, utf-16le, utf-16be, binary (no transformation), or auto (sniff from the content).
Timeout (ms)intNo60000Per‑call timeout override.
Max File Size (MB)intNo(connection default)Per‑call size cap override.
Append vs Overwrite

The form enforces that Append to File and Overwrite Existing cannot both be on. If both are off and the file exists, the connector preserves the existing file and writes a timestamped variant instead of failing — this is a safety net for batch jobs that re‑run.

Output structure

{
"filePath": "inbound/output/2026-01-15/orders.csv",
"bytesWritten": 4096,
"encoding": "utf-8",
"created": true,
"appended": false,
"duration": 87
}
FieldTypeDescription
filePathstringShare‑relative path actually written. May differ from the input fileName when overwrite is off and a timestamped variant was created.
bytesWrittennumberBytes written (after encoding transformation — UTF‑16 strings are larger than their UTF‑8 source).
encodingstringEncoding applied. When Encoding was set to auto, this is the encoding the connector picked.
createdbooleantrue if the file did not exist before the call.
appendedbooleantrue if the call appended (rather than wrote whole).
durationnumberServer‑side write duration in milliseconds.

Use cases

  • Export a CSV produced by an upstream pipeline node.
  • Stream log lines to a shared text log with append mode.
  • Drop a JSON metadata file alongside a binary file using binary encoding.

List Directory (smb.list.directory)

Purpose: Enumerate files and folders under a directory, with optional pattern filtering and recursive descent. Use it to discover what's available before fetching or as the source for a For‑Each loop in a pipeline.

Configuration

FieldTypeRequiredDefaultDescription
Directory PathstringNo/Directory path relative to Base Path. / lists the Base Path itself. Supports ((placeholder)).
File PatternstringNoOptional glob pattern applied to basenames (e.g., *.csv, report_*). Leave empty to list everything. Supports ((placeholder)).
RecursivebooleanNofalseWhen on, descends into subdirectories. The pattern still matches basenames at every depth.
Timeout (ms)intNo60000Per‑call timeout override.

Output structure

{
"path": "/",
"count": 3,
"files": [
{
"name": "data_2026-01-15.csv",
"path": "inbound/data_2026-01-15.csv",
"size": 2048,
"isDir": false,
"modified": "2026-01-15T08:30:00Z"
},
{
"name": "archive",
"path": "inbound/archive",
"size": 0,
"isDir": true,
"modified": "2026-01-14T12:00:00Z"
},
{
"name": "nested.csv",
"path": "inbound/archive/nested.csv",
"size": 512,
"isDir": false,
"modified": "2026-01-12T10:00:00Z"
}
]
}
FieldTypeDescription
pathstringThe directory listed, relative to Base Path. / means Base Path root.
countnumberNumber of entries returned (after pattern filtering).
files[].namestringBasename of the entry.
files[].pathstringShare‑relative path of the entry.
files[].sizenumberFile size in bytes (always 0 for directories).
files[].isDirbooleantrue if the entry is a directory.
files[].modifiedstringRFC 3339 / ISO 8601 UTC timestamp of last modification.
Recursion depth limit

The recursive walk is capped at 32 levels deep to avoid runaway symlink loops. Operators who hit this limit should narrow Base Path or restructure the share rather than raise the cap.

Use cases

  • Discover new files for a For‑Each loop.
  • Inventory a partner drop folder before pulling.
  • Confirm an upload landed by listing the parent folder.

Delete File (smb.delete.file)

Purpose: Delete a single file. Directories are intentionally not supported — RemoveAll has surprising semantics across SMB dialects, and tree deletion deserves a separate, deliberate feature.

Configuration

FieldTypeRequiredDefaultDescription
File NamestringYesFile path relative to Base Path. Supports ((placeholder)).
Timeout (ms)intNo60000Per‑call timeout override.

Output structure

{
"filePath": "inbound/processed/old.csv",
"deleted": true
}
FieldTypeDescription
filePathstringShare‑relative path of the deleted file.
deletedbooleanAlways true on success.

Use cases

  • Clean up files after a successful processing run.
  • Remove temp / staging files in a finalization step.

Move / Rename File (smb.move.file)

Purpose: Server‑atomic move within the share. Use it to rotate files between staging / inbound / processed folders, or to rename in‑place.

Configuration

FieldTypeRequiredDefaultDescription
Source PathstringYesSource file path relative to Base Path. Supports ((placeholder)).
Destination PathstringYesDestination file path relative to Base Path. Parent directories are created on demand. Supports ((placeholder)).
OverwritebooleanNofalseWhen on, replaces the destination if it already exists. When off and the destination exists, the call fails.
Timeout (ms)intNo60000Per‑call timeout override.
Same share only

Source and destination must both resolve under the connection's Base Path. SMB Rename is atomic on the server but doesn't span shares — to move across shares, use Fetch + Write + Delete instead.

Output structure

{
"sourcePath": "inbound/orders.csv",
"destinationPath": "inbound/processed/2026-01-15/orders.csv",
"moved": true
}
FieldTypeDescription
sourcePathstringResolved source path.
destinationPathstringResolved destination path.
movedbooleanAlways true on success.

Use cases

  • Move a file from inbound/ to processed/ after a pipeline finishes.
  • Rotate logs by renaming current.logcurrent-YYYYMMDD.log.
  • Rename a downloaded file in place.

Using Parameter Placeholders

Any string field that shows the ((parameterName)) icon accepts templated values, which are filled in at execution time (or from a pipeline node's expression):

PatternUse it for
data_((date)).csvDate‑stamped daily filenames
inbound/((partner))/orders.csvPer‑partner subfolders
((fileName))Pass through a name picked by an upstream node

In the Function Builder, declare each parameter's type, whether it's required, and a default. When the function is wired into a pipeline node, parameters bind to upstream outputs or constants.

Testing Functions

Every function type has a Test button next to the Save action. The Test dialog:

  1. Shows the resolved configuration (with placeholders filled in from your test inputs).
  2. Lets you override any parameter for this run.
  3. Executes against the live SMB server.
  4. Shows the full result — success / error, full output JSON, duration, and timestamp.

Use Test before saving when you're iterating on a pattern or path; use the Function Logs tab afterwards to see real pipeline executions.

Pattern Matching Reference

The fileName field in Fetch is the most flexible pattern field in the connector. It's worth understanding how the connector classifies what you typed:

You typedConnector treats it asRecursive matches against
report.csv (no metacharacters)Literal — single Stat call, no directory walkn/a
sub/report.csv (literal with /)Literal with path — single Stat call at that exact pathn/a
data_*.csv or data_???.csvGlob — wildcards * and ? are converted to regexbasename at any depth
log_[0-9]{8}\.txt, ^logs/.*\.log$, anything with [ ] ( ) ^ $ | +Regex — used verbatimbasePath‑relative path when the pattern contains /, basename otherwise

The Recursive toggle interacts with these rules:

  • Recursive OFF + literal: single Stat at <basePath>/<name>.
  • Recursive ON + bare literal (no /): walks the tree and matches on basename at any depth — nested.csv finds sub/nested.csv.
  • Recursive ON + literal with /: still resolved as a single Stat at the exact path (no walk needed).
  • Recursive ON + glob / regex with no /: walks the tree and matches each entry's basename.
  • Recursive ON + glob / regex with /: walks the tree and matches the basePath‑relative path — use this when you want to scope by directory, e.g., ^logs/.*\.log$.

Pipeline Integration

SMB connection functions are exposed as nodes in the Pipeline Designer under the Storage category. See the SMB Pipeline Nodes guide for the per‑node parameter reference and output shapes.

The five SMB node types are:

NodeFunctionUse it for
SMB Fetch Filesmb.fetch.fileRead a file as part of a pipeline.
SMB Write Filesmb.write.fileWrite a file as part of a pipeline.
SMB List Directorysmb.list.directoryDiscover files to iterate over (For‑Each).
SMB Delete Filesmb.delete.fileClean up after processing.
SMB Move Filesmb.move.fileRotate files between folders (inbound → processed).

Drag a node into your pipeline, pick the SMB connection and a function, bind parameters to upstream outputs or constants, and wire it into the rest of the flow.

Common Use Cases

File‑Drop Ingest

A partner / PLC / MES drops a daily CSV onto the share; the pipeline picks it up, parses it, pushes the rows to UNS, and archives the original.

[Schedule Trigger] → [SMB List (pattern *.csv)] → [For Each]
→ [SMB Fetch] → [File Extractor] → [UNS Publish]
→ [SMB Move (→ processed/)]

Daily Export

A pipeline aggregates today's data, formats it as CSV, and writes it to a share so an external system can pick it up.

[Schedule Trigger] → [SQL Query] → [Data Serializer (CSV)] → [SMB Write]

Cross‑System Hand‑Off

Move files from an "inbound" staging folder into a "processed" folder once an analytics step succeeds, leaving a timestamped trail for audit.

[SMB List] → [For Each] → [SMB Fetch] → [Process] → [SMB Move (inbound → processed/((date)))]

Find Files Anywhere

A vendor drops files into arbitrary subfolders. A bare‑name fetch with Recursive on locates the file without knowing the exact path.

fileName: ((reportName))
recursive: true

Troubleshooting

Connection problems

SymptomLikely causeFix
connection refusedWrong port or SMB blocked at the firewallConfirm the server listens on 445; check inter‑VLAN firewall rules.
connect timeoutHost unreachable or DNS misconfiguredVerify hostname and route from the MaestroHub host.
STATUS_LOGON_FAILURE / authentication failedWrong credentials or wrong domainRe‑check username, password, domain. For local accounts on a workgroup machine, leave Domain empty.
signing required but the server did not agree (smb session setup failed)Server has SMB signing disabled or the dialer's negotiator could not agreeEither disable Require Message Signing on the connection or re-enable signing on the server.
Health check flaps every few minutesIdle session being killed by the serverLower Idle Reconnect Threshold (e.g., 300 seconds).

Fetch / pattern issues

SymptomLikely causeFix
no files found matching pattern: <name> with a file you know existsFile lives in a subfolder; Recursive is offEnable Recursive, or qualify the path: subfolder/<name>.
no files found matching pattern: <pattern>Pattern doesn't actually matchUse List Directory with no pattern to see the real filenames; then refine.
discovery limit exceededWalk visited more files than Discovery Limit allowsNarrow Base Path / pattern, or raise the limit.
file size … exceeds maximum allowed sizeFile is larger than Max File Size (MB)Raise the per‑call cap (up to 256 MB) or the connection default.
file is not valid UTF-8; use outputFormat=base64The file is binary but you asked for text outputSwitch Output Format to base64.

Write issues

SymptomLikely causeFix
file already exists and overwriteExisting is falseTarget exists, both flags offTurn on Overwrite Existing, or change the filename, or let the connector write a timestamped variant by leaving Create File on.
file does not exist and createFile is falseWrote with Create File off and no existing fileTurn Create File on, or write to a path that exists.
permission deniedThe user can read the share but not writeCheck share / NTFS ACLs for the user.

Move / Delete issues

SymptomLikely causeFix
destination file already exists (set overwrite=true to replace)Target exists, Overwrite offSet Overwrite = true or pick a different destination.
cannot move directories, only filesSource is a directoryUse Delete + Write of individual files instead, or open an issue if directory moves are required.
source path is outside base directory / destination path is outside base directoryPath traversal attempt (../…)Keep paths relative to Base Path; the connector's traversal guard is intentional.
Health check

After the connection is saved, use the Test Connection button. It runs the same handshake an operation would and surfaces auth / encryption / reachability errors before functions start failing.

  • SMB Pipeline Nodes — per‑node parameter reference and output shapes for the pipeline designer.
  • FTP / SFTP — for remote file servers that don't expose SMB.
  • Local File — for files on the MaestroHub host's filesystem.
  • File Extractor — parse CSV / Excel content returned by SMB Fetch.