Outgoing SMB connections

Host, port, NTLM credentials and share-rooted remote paths for Windows file shares.

An outgoing SMB connection is how a Zato service reaches a Windows file share, or anything else speaking SMB. Services look connections up by the name given here.

In Dashboard, go to Connections → Outgoing → SMB and click Create.

The fields:

NameNotes
NameThe name of the connection, as used in your services
HostThe remote server's host
PortThe remote server's port, with a default of 445
UsernameThe username to log in with
PasswordThe password to log in with

The connection authenticates with NTLM, using the username and password from its definition. Everything else, such as the protocol dialect, signing and encryption, is negotiated with the remote server automatically.

Paths

Every remote path starts with the name of the share, followed by directories and the file itself, using forward slashes:

MyShare/documents/invoice.pdf

An SFTP path is rooted in the remote file system, an SMB path is rooted in a share. A directory that is /incoming/invoices on an SFTP server is MyShare/incoming/invoices on a share, and that includes the directory a schedule is given.

What you can do with the connection

Once the connection exists, a service reaches it through self.smb:

from zato.server.service import Service

class MyService(Service):

    def handle(self):

        conn = self.smb['My SMB Connection']
        conn.ping()

See the connection API for everything the connection object offers, and file transfer schedules for having Zato watch a directory on this share for you.

Learn more