Updates fails with an Error “Permission denied” every time
# bash <(curl -Ss https://my-netdata.io/kickstart-static64.sh)
--- Found existing install of Netdata under: /opt/netdata ---
--- Attempting to update existing install instead of creating a new one ---
[/var/lib/fail2ban]# /opt/netdata/usr/libexec/netdata/netdata-updater.sh --not-running-from-cron
Mo 17. Jan 10:38:29 CET 2022 : INFO: Checking if a newer version of the updater script is available.
/opt/netdata/usr/libexec/netdata/netdata-updater.sh: line 120: /tmp/netdata-test.pcBiIZOo7D: Permission denied
/opt/netdata/usr/libexec/netdata/netdata-updater.sh: line 120: /tmp/netdata-test.M5DBi1vyIm: Permission denied
Mo 17. Jan 10:38:30 CET 2022 : INFO: Entering /tmp/netdata-updater-0RZujQJrGk
Mo 17. Jan 10:38:30 CET 2022 : INFO: Current Version: 00103200100071
Mo 17. Jan 10:38:30 CET 2022 : INFO: Latest Version: 00103200100078
Mo 17. Jan 10:38:30 CET 2022 : INFO: Update available
Mo 17. Jan 10:38:30 CET 2022 : ERROR: FAILED TO UPDATE NETDATA : Static binary checksum validation failed. Stopping netdata installation and leaving binary in /tmp/netdata-updater-0RZujQJrGk\nUsually this is a result of an older copy of the file being cached somewhere and can be resolved by simply retrying in an hour.
FAILED
ABORTED Failed to update existing Netdata install
What I expected to happen
Can anyone lead me to the solution? What can I do?
Regards
/opt/netdata/usr/libexec/netdata/netdata-updater.sh
Mon 17 Jan 2022 07:24:54 PM CET : INFO: Checking if a newer version of the updater script is available.
Mon 17 Jan 2022 07:24:55 PM CET : INFO: Downloading newest version of updater script.
/opt/netdata/usr/libexec/netdata/netdata-updater.sh: line 120: /tmp/netdata-test.asd1ZONNKe: Permission denied
/opt/netdata/usr/libexec/netdata/netdata-updater.sh: line 120: /tmp/netdata-test.eZZX7iWTkO: Permission denied
/opt/netdata/usr/libexec/netdata/netdata-updater.sh: line 233: /tmp/netdata-updater-Oz8emSkRcb/netdata-updater.sh: Permission denied
# ll /tmp/netdata-updater-Oz8emSkRcb/netdata-updater.sh
-rwxr-xr-x 1 root root 21012 Jan 17 19:24 /tmp/netdata-updater-Oz8emSkRcb/netdata-updater.sh
Ok, My problem is, I do have the mount option noexec for /tmp
Must be omitted,
I did mount /tmp/ -o remount
then a second try was successul
As a newbie to netdata, I would say build the updater to be called using sh, then there is no harm if someone has mounted their /tmp with noxec, or use a different path…
But otherwise great feature, I’m thrilled.
Thanks for your time and thanks for netdata.
Bernd
The updater itself should work fine if invoked with a plain, POSIX-compliant shell, and it should be handling temporary directories correctly (it should try $TMPDIR, /tmp, and then the current working directory, in that order, searching for the first that is both writable and allows execution). It looks like you may have stumbled across a bug in the updater itself here, independent of the checksum validation issue for static builds.
mount /tmp -o remount,exec
/opt/netdata/usr/libexec/netdata/netdata-updater.sh
Mi 19. Jan 09:36:51 CET 2022 : INFO: Checking if a newer version of the updater script is available.
Mi 19. Jan 09:36:51 CET 2022 : INFO: Entering /tmp/netdata-updater-XB48GRLcP1
Mi 19. Jan 09:36:51 CET 2022 : INFO: Current Version: 00103200100078
Mi 19. Jan 09:36:51 CET 2022 : INFO: Latest Version: 00103200100096
Mi 19. Jan 09:36:51 CET 2022 : INFO: Update available
Mi 19. Jan 09:36:52 CET 2022 : ERROR: FAILED TO UPDATE NETDATA : Static binary checksum validation failed. Stopping netdata installation and leaving binary in /tmp/netdata-updater-XB48GRLcP1\nUsually this is a result of an older copy of the file being cached somewhere and can be resolved by simply retrying i
Hm, could be your “netdata-updater.sh” doesn’t contain the fix and the script self auto-update doesn’t work for some reason.
Mi 19. Jan 09:36:51 CET 2022 : INFO: Checking if a newer version of the updater script is available.
Mi 19. Jan 09:36:51 CET 2022 : INFO: Entering /tmp/netdata-updater-XB48GRLcP1