Migrate the data directory in ntopng

Posted · Add Comment

Up to release 3.6 ntopng on Unix systems is using ‘/var/tmp/ntopng’ as default directory for storing historical data, and ‘nobody‘ as default user.

Since ntopng 3.7, for security reasons, the default setting for the data directory has been changed to ‘/var/lib/ntopng’, and the default user has been changed to ‘ntopng‘ (which is created during package installation if you are installing from our repositories, otherwise it keeps using ‘nobody‘).

In order to maintain backward compatibility, if you are already using ‘/var/tmp/ntopng’ as data directory, ntopng keeps using that folder, owned by ‘nobody‘. This said, using the old defaults is not recommended and a manual action is required in order to migrate to the new settings, unless you are already using a custom directory:

  1. stop ntopng
  2. move ‘/var/tmp/ntopng’ to ‘/var/lib/ntopng’
  3. change the owner to ‘ntopng’
  4. start ntopng

Example on systemd-based systems:

systemctl stop ntopng
rmdir /var/lib/ntopng
mv /var/tmp/ntopng /var/lib/ntopng
chown -R ntopng:ntopng /var/lib/ntopng
systemctl start ntopng

Please note that it is still possible to customize the data directory path using the –data-dir|-d <path> parameter to override the default settings.

Posted in: ntop

Comments are closed.