Skip to main content

Using network shares (UNC paths) with Syncplify Server! v6+ on Linux

Since the Linux version of Syncplify Server! is implemented as a systemd service, this knowledge base article assumes a basic familiarity with the Linux operating system and with its systemd subsystem.

All of the operations below are assumes to be performed as root or via sudo.

First of all you need to prepare, ahead of time, a file containing the credentials that will be needed to access the SMB/CIFS shared path. For the sake of this tutorial we will save these credentials in the /etc/.smbcreds file, which will have this format and contents (but with your own credentials, of course):

username=username_to_access_smb_share
password=password_to_access_smb_share

Next, you have to create a directory that will be used as local "mount point? for the remote SMB/CIFS share when it's mounted on system boot. For the sake of this example let's call it sftpdata:

mkdir /sftpdata

Now you will have to create two files in systemd's configurations directory. It doesn't matter how you call these files, as long as they have the same name, and the exact extensions shown here below:

File: /etc/systemd/system/smbsftpdata.mount

[Mount]
What=//10.0.5.23/your/remote/share
Where=/sftpdata
Options=credentials=/etc/.smbcreds,noperm,vers=2.1,_netdev
Type=cifs

File: /etc/systemd/system/smbsftpdata.automount

[Unit]
Requires=remote-fs-pre.target
After=remote-fs-pre.target

[Install]
WantedBy=remote-fs.target

The last step is to enable the automount in systemd, so that next time the OS boots this shared path will be automatically mounted in your system:

systemctl enable smbsftpdata.automount

Done! Now reboot your operating system, and after the reboot systemd services (including Syncplify Server!) will have access to your remote SMB/CIFS shared folder contents via the local mount point /sftpdata.