• Resources
    • Documentation
    • Knowledge Base
    • Forum
    • Webinars and Videos
    • Courses
    • FAQ
    • Changelog
    • Blog
    • Swag Shop
  • Marketplace
  • Login
  • Resources
    • Documentation
    • Knowledge Base
    • Forum
    • Webinars and Videos
    • Courses
    • FAQ
    • Changelog
    • Blog
    • Swag Shop
  • Marketplace
  • Login
home/Knowledge Base/Plugins/Use ContentRepository Plugin to handle Files from your Windows Share Volume

Use ContentRepository Plugin to handle Files from your Windows Share Volume

271 views 0

Written by Verena
May 10, 2021

Precondition

This article uses Samba to connect via SMB networking protocol to a Windows File Share. SMB uses Port 445 by default, so check your firewall rules to allow connections between simplifier docker host and the windows volume.

Step 1 Prepare Content Repository Role

In the Simplifier Admin Interface, go to Users -> Roles and add a new Role. Enter “Plugin: Content Repository” in the “Add Permissions” input field and choose the “Plugin: Content Repository” entry.

For the characteristic “Permission Object ID”, enter a meaningful value. This value will be referenced in the next step (for this tutorial SMB_Share is used).

For the characteristic “Permission Object Type”, please leave the default value “App” untouched.

Give the role a meaningful name and save it.

Switch to the Users tab, search for your user and add the newly created role to your user and any other user who should be able to use this content repository. To do so, double click on the user and enter the name of your role in the “Add Role” input field.

Step 2 Prepare Content Repository

Download the Business Object ‘SF_ContentRepository_ClearFileSystem’ from our Simplifier Marketplace and test the call ‘contentRepositoryAdd’:



		

This will create a new folder in the file system of the Simplifier host. Log into your Simplifier host via SSH and check:

ls /opt/simplifier/data/plugins/contentRepo

The output shows a folder named like the value you entered as “repoName”.

Step 3 Prepare Simplifier host

Login via SSH to your Simplifier host

3.1 Create a new directory

mkdir /mnt/smbshare

3.2 Prepare your Authentication Credentials

Create a new file .smbcredentials

vim /etc/samba/.smbcredentials

with the following settings:

username=windowsUser
password=windowsUserPasswort

Change the access right to this file to be read by root only.

chown root /etc/samba/.smbcredentials
chmod 0400 /etc/samba/.smbcredentials

3.3 Create fstab entry

vim /etc/fstab

add a line the following content and adapt the hostname to your setup

//host.windowsserver.com/share /mnt/smbshare cifs credentials=/etc/samba/.smbcredentials,uid=linuxuser,gid=linuxgroup 0 0

3.4 Test access to windows volume

mount /mnt/smbshare
ls /mnt /smbshare

should now show you the content of your Windows volume

Step 4 Change Docker config

Last step is to make the smbshare available to the Docker file system. This is done by adding another volume parameter to the docker run command.

 -v /mnt/smbshare:/opt/simplifier/data/plugins/contentRepo/smbshare

In a typical setup the complete run command looks like:

docker run --name simpifier \ 
-v /opt/simplifier/data:/opt/simplifier/data \
-v /mnt/testfileserver:/opt/simplifier/data/plugins/contentRepo/RemoteRepo \
-p 80:80 -p 443:443 -p 8090:8090 \
-d simplifierag/runtime:latest
Tags:smbsambamountlocal filesfile directorybrowse files

Was this article helpful?

Yes  No
Related Articles
  • Generating a PDF with Simplifier via Plugin
  • Create a PDF Template via Plugin
  • How to use Simplifier Content Repository Plugin
  • Plugin development with NodeJS
Leave A Comment Cancel reply

You must be logged in to post a comment.

Latest Articles
  • REST: Use a CSRF Token and a Cookie to authorize Requests
  • Use the Adobe PDF Embed API in your Simplifier Application
  • Process Designer: Keeping an overview
  • Contact | Imprint | Privacy | © 2022 Simplifier AG. All Rights Reserved.

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.