Hello,
I don’t think the issue is needing to be root. You should be the knime user to perform this operation - if your KS runs under a service principal (knime) and you install extensions as root, the resulting installed files may be owned by root:root and could cause problems for the knime user to be unable to modify them.
Below is an excerpt from notes I made for this process for installing indigo extensions under KS4.11/KE 4.2. It should still be valid for later/current versions as well.
# stop the executor
sudo systemctl stop knime_executor.service
# become the knime user
su - knime
# go to the executor directory; obviously change this if your directory is in a different place 
cd /opt/knime_server/knime_executor/
# make a backup of the current knime.ini
cp knime.ini knime.ini.`date -I`
# note that the above is a capital I for the date parameter
# remove the profileLocation and profileList directives; the updating process doesn’t work correctly with them in there
vi knime.ini
# obviously you can use your favorite editor. but vi is the best! 
The lines you need to remove will look something like:
-profileLocation
http://127.0.0.1:8080/knime/rest/v4/profiles/contents
-profileList
executor
# if they’re not there, then obviously you can skip this step.
# once you have those lines deleted, save and exit the knime.ini file
# optional: review count of plugins; should be around 0
du -a | grep indigo | wc -l
# you can change ‘indigo’ to a unique keyword for whatever plugin you’re trying to work on, obviously
# run the update to install the plugins.
# this command will redirect all output for stdout and stderr into output.txt, which can be reviewed or sent in to support if needed
# the section -r XXX
should work for current version of KE (4.4.x)
# the section -i XXX
will change depending on what extensions you’re adding, obviously. As per the documentation, it can be a comma-separated list (no spaces) of extensions that you wish to install; e.g. -i some.feature.one,some.feature.two,some.feature.three
# the section -d /opt/knime_server/knime_executor
should be changed to fit your actual executor location.
./knime -application org.eclipse.equinox.p2.director -nosplash -consolelog -r ‘https://update.knime.com/analytics-platform/4.4,https://update.knime.com/community-contributions/4.4,https://update.knime.com/community-contributions/trusted/4.4,https://update.knime.com/partner/4.4’ -i com.epam.indigo.knime.feature.feature.group -d /opt/knime_server/knime_executor > output.txt 2>&1
# optional: review output.txt to see if there are any errors
more output.txt
# optional: review count of plugins; should be around 495 for indigo. obviously for other extensions it will be more, but if you get a notably larger result than the 0 you should have had at the start, then that’s usually a sign you did it right.
du -a | grep indigo | wc -l
# move the old knime.ini, which contains the profileLocation and profileList directives, back into place
mv knime.ini.`date -I` knime.ini
# exit the knime user shell
exit
# start the executor to pick up the new plugins/extensions
sudo systemctl start knime-executor.service
Hope this helps!
Regards,
Nickolaus
[1] KNIME Server Administration Guide