At the end of 2018 and especially in January 2019, @AlCalzone has completely overhauled the ioBroker installer, which means that in the meanwhile most current version from the beginning of February 2019 all rights issues are a thing of the past. ioBroker is no longer running as "root" but under its own user who can do whatever he needs for the current ioBroker adapters. Everything is fine for all new installations.
But what if someone has installed ioBroker earlier? He still runs as root? Or in the first days of the new installation routine? Also thanks to @AlCalzone we have a solution: the installation fixer
By means of a command, an existing installation in / opt / iobroker is brought up to the same level as a current new installation. The script can be used again and again in the future to update the installation in this regard. Important: This script does not update nodejs, npm, nor js-controller or any adapter. Only the system rights u.a. are being edited. Try and give feedback in the discussion thread at https://forum.iobroker.net/topic/20212/diskussion-to-new-installation-fixer
Please note: Application under Docker should not be necessary because everything runs as root anyway, and we currently advise against an application for lack of clear experience and feedback. If someone wants to try and give feedback: application completely at your own risk. Be sure to back up and know what you are doing!
Please note the FAQ post in this thread!
The script to be executed, as with the installer, is loaded by GitHub and is always up to date. The command is:
curl -sL https://iobroker.net/fix.sh | bash -
Good luck and always a current installation,
Apollon77 & AlCalzone
FAQ
Do I have to use the fixer?
We recommend to update the installation and therefore to use the fixer. So you have an installation that we can support even if there are problems. With npm 5 and higher, there were more and more problems when working with root or sudo and the new installer, and so on the fixer for Linux-based systems are taking this into account and trying to prevent these problems. And the safety aspects are not negligible.
Where can I see what the fixer does?
We try to keep the installer and fixer up to date. Both have a changelog. Installer: https://github.com/ioBroker/ioBroker/blob/master/CHANGELOG_INSTALLER_LINUX.md Fixer: https://github.com/ioBroker/ioBroker/blob/master/CHANGELOG_FIXER_LINUX.md Otherwise, directly view the script if your something understands shell programming 🙂
Which user is the best way to execute the fixer?
It does not matter in fact. It's best to do it as a normal user, then you can work with it afterwards.
In which directory is the fixer executed best?
It does not matter. The current fixer (2019-02-21) expects installation in / opt / iobroker
For which operating systems does the fixer apply?
For all Linux-based systems. Windows is not covered here.
What exactly does the fixer do?
The fixer creates an ioBroker user, sets file and directory permissions correctly for this user and also some sudo rights and everything needed to work without root with ioBroker and npm.
Can the fixer be run multiple times when there are updates?
Yes, and that is explicitly meant to be up-to-date as the installer evolves.
Are there special situations where the fixer should be executed additionally?
The fixer also handles special rights when using redis and backitup. If Redis is already installed in the application everything will be automatically set correctly. If Redis will be installed later, Fixer will do it correctly too.
Can the installation fixer also be used under Docker?
Currently there are still few experiences and the results are very mixed. Therefore, we currently advise against a use, also because everything in the container usually runs as root and therefore is not relevant anyway. If you still like and want to give feedback: Use in Docker at your own risk and NEVER without backup and knowledge of what you do!
What can I do if I'm not sure what's going on?
You can simply copy the ioBroker directory beforehand, except that permissions are not changed.