rsync folder and daemon

Here you can post about the issues related to modifications performed manually (not through the kiosk wizard). Example: swapped kernel, added 3rd party modules or files.
Please describe in detail what has been changed and hopefully other kiosk user will be able to help.
Porteus team wont resolve bugs posted in this category as we support only modifications made by the kiosk wizard.
Post Reply
archaon21
Ronin
Ronin
Posts: 2
Joined: 16 Aug 2017, 10:42
Distribution: Porteus-kiosk

rsync folder and daemon

Post#1 by archaon21 » 16 Aug 2017, 11:23

Hello,

We want to prepare a computer than only have access to a internal web and a folder with some pdf files syncroniced with rsync every 40-45 minutes.
The Porteus-kiosk solution is perfect because we only allow access using whitelisting and bookmarks and even if the user close the web explorer, it opens automaticaly.
My first attempt was to create a folder (named securetat) in /home/guest/seguretat, but after time (I don't know how much time passed), the folder were deleted automaticaly.

Now I'm trying to create a folder in /opt/seguretat decompressing the module 003-settings.xzm and making a

Code: Select all

mkdir -p /tmp/kiosk_ISO/xzm/squashfs-root/opt/seguretat
Will this folder be accessible for the guest user? The folder permissions are

Code: Select all

drwxrwxr-x.  2 jose jose  40 ago 16 13:05 seguretat
The content of this folder will be erased after x time too? I need this folder permanently with its content (that will be overwriten with every syncronitation).

And also, how can i make rsync-daemon listen so I can syncronize the files from the server?

Thanks in advance.

User avatar
fanthom
Site Admin
Site Admin
Posts: 4621
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

rsync folder and daemon

Post#2 by fanthom » 16 Aug 2017, 12:26

Hello archaon21,

There is no need to remaster the ISO as everything could be done using 'run_command=' parameter. You need to enable persistence for /opt/storage first and then sync your content every 40 minutes from any rsync enabled server. Sample:

Code: Select all

run_command=sh /opt/scripts/persistence; ( while true; do rsync -a ponce.cc::porteus/x86_64/testing /opt/storage/seguretat; sleep 40m; done; ) &

If you want to push something from PK Server to the clients then you just need to select proper action in Admin Panel, select source folder and enter destination directory as /opt/storage/seguretat.
No need to start any rsync daemon.

Thank you.
Please add [Solved] to your thread title if the solution was found.

archaon21
Ronin
Ronin
Posts: 2
Joined: 16 Aug 2017, 10:42
Distribution: Porteus-kiosk

rsync folder and daemon

Post#3 by archaon21 » 17 Aug 2017, 07:22

Hello fanthom,

Thanks for the answer, but we need the rsync daemon because we don't have any share in the server (it's not a PK server). The files are generated in an aplication server and after that the aplication launches the rsync to the clients. We don't have any files yet in the path.

We configured PK with 2 bookmarks, one with the internal url, and another with the path where the files will be (file:///opt/seguretat). The PK will be used as security station in case we have a network issue and the workers could see relevant information. PK will not be in a public space but we want to limitate the access.

Thanks in advance.

User avatar
fanthom
Site Admin
Site Admin
Posts: 4621
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

rsync folder and daemon

Post#4 by fanthom » 17 Aug 2017, 12:36

Rsync daemon is not needed if you sync the content over ssh:

Code: Select all

rsync -av --delete -e "sshpass -p toor ssh -oUserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" /tmp/work/website 192.168.1.22:/opt/storage
In this case i'm using sshpass to avoid typing the ssh password and syncing local /tmp/work/website folder with /opt/storage/website on the kiosk side. Kiosk has 192.168.1.22 IP and root password is set to toor.

Please try this command yourself.
Please add [Solved] to your thread title if the solution was found.

Post Reply