Trouble updating NetData on Synology

I’m receiving a Warning in your cloud UI stating that my Synology NAS Netdata installation is out of date (NAS2 is below the latest stable agent version v2.1.0 Please update them to ensure you get the latest security bug fixes). Unfortunately, your update script is NOT working in this case. This is the output I received:

--2025-01-18 11:33:56--  https://get.netdata.cloud/kickstart.sh
Resolving get.netdata.cloud... 172.67.36.172, 104.22.78.229, 104.22.79.229, ...
Connecting to get.netdata.cloud|172.67.36.172|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 94287 (92K) [application/octet-stream]
Saving to: '/tmp/netdata-kickstart.sh'
/tmp/netdata-kickstart.sh                   100%[==========================================================================================>]  92.08K  --.-KB/s    in 0.07s
2025-01-18 11:33:56 (1.38 MB/s) - '/tmp/netdata-kickstart.sh' saved [94287/94287]
 WARNING  Cannot find usable OS release information. Native packages will not be available for this install.
/tmp/netdata-kickstart.sh: line 591: /tmp/netdata-test.97Z2qwhEvg: Permission denied
 --- Using /tmp/netdata-kickstart-OLVKM8xbDz as a temporary directory. ---
 --- Checking for existing installations of Netdata... ---
 --- Found an existing netdata install at /volume1/opt/netdata, with installation type 'kickstart-static'. ---
[/tmp/netdata-kickstart-OLVKM8xbDz]# test -x /volume1/opt/netdata/usr/libexec/netdata/netdata-updater.sh
 OK
[/tmp/netdata-kickstart-OLVKM8xbDz]# /volume1/opt/netdata/usr/libexec/netdata/netdata-updater.sh --interactive --not-running-from-cron
Sat Jan 18 11:33:56 EST 2025 : INFO: netdata-updater.sh:  Checking if a newer version of the updater script is available.
Sat Jan 18 11:33:56 EST 2025 : FATAL: netdata-updater.sh: FAILED TO UPDATE NETDATA:  Unable to find a usable temporary directory. Please set $TMPDIR to a path that is both writable and allows execution of files and try again.
Sat Jan 18 11:33:57 EST 2025 : INFO: netdata-updater.sh:  Downloading newest version of updater script.
Sat Jan 18 11:33:57 EST 2025 : FATAL: netdata-updater.sh: FAILED TO UPDATE NETDATA:  Unable to find a usable temporary directory. Please set $TMPDIR to a path that is both writable and allows execution of files and try again.
 FAILED
The following non-fatal warnings or errors were encountered:
  - Cannot find usable OS release information. Native packages will not be available for this install.
  - Unable to find a usable temporary directory. Please set  to a path that is both writable and allows execution of files and try again.
ABORTED  Failed to update existing Netdata install at /volume1/opt/netdata: Unable to find a usable temporary directory. Please set  to a path that is both writable and allows execution of files and try again.
For community support, you can connect with us on:
  - GitHub: https://github.com/netdata/netdata/discussions
  - Discord: https://discord.gg/5ygS846fR6
  - Our community forums: https://community.netdata.cloud/
[/root]# rm -rf /tmp/netdata-kickstart-OLVKM8xbDz
OK

The error output stating that the /tmp directory is unusable is incorrect. /tmp/netdata-kickstart.sh had no problem writing to it and I verified that the file is actually there. There is 3GB of space available in the /tmp file system, so this shouldn’t be a problem either. I tried running with sudo – NO help. The original installation was moved to under the /volume1 file system way back when because the root file system is tight on a Synology NAS. I even tried creating a /tmp directory under the /volume1/opt/netdata and exported $TMPDIR to it with no help.
So, what am I missing? Please advise. Synology DSM 7.1.1-42962 Update 7 on DS1515+

Hi,

It seems that the first thing that fails is chmod +x on the test file it creates in the temporary directory. Your setup may be restricting permissions in that location?

ralphm

The permissions on the /tmp file system are what I typically see on most Linux/Unix based systems drwxrwxrwt (note: the sticky bit is set). Now, Synology does NOT allow end users to login directly to root; but sudo access is allowed. I tried running this script with sudo and it still complains.

I ran into this too. Not sure if this is the best solution but it worked for me…

sudo TMPDIR=$HOME /opt/netdata/usr/libexec/netdata/netdata-updater.sh