Data directory
Where the data is stored
PlantBeat Box: All data is stored on the internal storage of the Box. From outside, you can only reach it through the user interface: through export, backup, support package or the interface (API).
Windows: Databases, settings and logs are stored in the folder
%ProgramData%\Smartlife\SelfService
Include this folder in your backup. Among other things, the folder contains the databases selfservice*.db, the settings files such as zugang.json (access protection), smtp.json (mail server) and storage-target.json (storage target), and the subfolders logs, updates and zertifikat.
Instead of storing measurements and data records locally, you can also store them in your own database (SQL Server, PostgreSQL, MySQL / MariaDB). See Retention and storage.
How long data is kept
By default, PlantBeat keeps measurements for 30 days and alarms for 90 days. You set this under Settings, section "Data", card "Data retention", and you can set different periods for individual values. See Retention and storage.
How passwords are protected
- PlantBeat stores the users' sign-in passwords only as a hash (PBKDF2-SHA256 with 210,000 iterations and salt), never in plain text.
- Passwords for PLCs, mail server and external database are stored encrypted with a key that is bound to the device. On Windows, this is Windows data protection (DPAPI), on the Box a separate key file.
- Backups are encrypted with your passphrase (AES-256-GCM).
- The support package and the log download contain no passwords, tokens or keys.
Windows: secure the data directory
Without its own permissions, the folder inherits the defaults of ProgramData. In that case, every user of the computer can create and read files there. Anyone who places a settings file there before PlantBeat does, for example smtp.json, could thereby dictate the mail server, storage target or access protection. The folder cannot be reached over the network. An attacker needs their own account on this computer.
- New installation from 1.11: The setup creates the folder with protection. Only SYSTEM and the administrators have full access, and in desktop mode also the account that started the setup.
- Existing installations keep their permissions. The setup deliberately does not repair them on its own.
If the folder is open, the Diagnostics page permanently reports "SECURITY: The data directory … is writable for …". In that case, IT carries out the following steps.
Warning
Run all commands in a Command Prompt (cmd.exe) as administrator, not in PowerShell. PowerShell does not expand %ProgramData%, and the commands fail. Close PlantBeat or stop the service first: sc stop PlantBeat.
Look for redirections. PlantBeat itself does not create directory junctions or symbolic links.
dir /AL /S "%ProgramData%\Smartlife\SelfService""File Not Found" is the normal case. Otherwise, remove each hit with
rmdir "<path>"(directory junction) ordel "<path>"(file link). This only deletes the link, not its target.Check the owner of the files.
dir /Q /S "%ProgramData%\Smartlife\SelfService"Files owned by
NT AUTHORITY\SYSTEM,BUILTIN\Administratorsand the account PlantBeat runs under are fine. If a settings file belongs to another account: check its content, delete it if in doubt and make the setting again in PlantBeat. Exceptionzugang.json: without this file, PlantBeat starts in the factory state. Set up access protection again immediately afterwards.Check the parent folder. If the Diagnostics page reports that the parent folder belongs to another account, reset the owner and permissions of this folder. The commands for this are in chapter 7 of the manual that is installed with PlantBeat (Start menu, "PlantBeat Anleitung").
Set permissions, only on the folder itself, without
/T. Entries below it inherit the permissions automatically.Service mode (the service runs as SYSTEM, users need no permissions):
icacls "%ProgramData%\Smartlife\SelfService" /setowner *S-1-5-32-544 icacls "%ProgramData%\Smartlife\SelfService" /inheritance:r /grant:r *S-1-5-18:(OI)(CI)F *S-1-5-32-544:(OI)(CI)FDesktop mode (adjust the operator account, add further accounts with further
"<account>:(OI)(CI)M"):icacls "%ProgramData%\Smartlife\SelfService" /setowner *S-1-5-32-544 icacls "%ProgramData%\Smartlife\SelfService" /inheritance:r /grant:r *S-1-5-18:(OI)(CI)F *S-1-5-32-544:(OI)(CI)F "DOMAIN\operator:(OI)(CI)M"Verify.
icacls "%ProgramData%\Smartlife\SelfService"now only shows the entries you set. Start PlantBeat (orsc start PlantBeat). The Diagnostics page no longer shows a "SECURITY" notice.