Strange files unter /tmp

Hello Community,

First of all:

Version: 6.5.0-1749479096.931d2586.focal

Repository: deb https://dl.packager.io/srv/deb/zammad/zammad/stable/ubuntu 20.04 main

OS version: Ubuntu 20.04.6

After a unexpected 502 error from then Nginx web server I took a look at OS level and found three files in the /tmp directory:


-rw-r–r-- 1 zammad zammad 14433 Jun 10 09:45 20250610-1296118-cbksip

-rwx–x–x 1 root root 492 Jun 10 08:34 tmp.j7aketvDmB
-rwx–x–x 1 root root 3145 Jun 10 08:32 tmp.rvrenBvWE4

Both tmp.j7aketvDmB and tmp.rvrenBvWE4 are Bash Scripts and 20250610-1296118-cbksip is a JPEG image. Below you find the content of the Bash scripts:

I never encountered these files before, so I would be glad if you could help me.

Regards,

Karsten

tmp.j7aketvDmB

#!/bin/bash
#
# packager.io postinstall script
#
PATH=/opt/zammad/bin:/opt/zammad/vendor/bundle/bin:/sbin:/bin:/usr/sbin:/usr/bin:
# import config
. /opt/zammad/contrib/packager.io/config
# import functions
. /opt/zammad/contrib/packager.io/functions
# exec postinstall
debug
detect_os
detect_docker
detect_initcmd
detect_database
detect_webserver
enforce_redis
create_initscripts
stop_zammad
update_or_install
set_env_vars
start_zammad
create_webserver_config
final_message

tmp.rvrenBvWE4

#!/bin/bash
#
# packager.io preinstall script
#

#
# Make sure that after installation/update there can be only one sprockets manifest,
#   the one coming from the package. The package manager will ignore any duplicate files
#   which might come from a backup restore and/or a manual 'assets:precompile' command run.
#   These duplicates can cause the application to fail, however.
#
rm -f /opt/zammad/public/assets/.sprockets-manifest-*.json || true

# Ensure database connectivity
if [[ -f /opt/zammad/config/database.yml ]]; then
   DB_HOST="$(grep -m 1 '^[[:space:]]*host:' < /opt/zammad/config/database.yml | sed -e 's/.*host:[[:space:]]*//g')"
   DB_PORT="$(grep -m 1 '^[[:space:]]*port:' < /opt/zammad/config/database.yml | sed -e 's/.*port:[[:space:]]*//g')"
   DB_USER="$(grep -m 1 '^[[:space:]]*username:' < /opt/zammad/config/database.yml | sed -e 's/.*username:[[:space:]]*//g')"
   DB_PASS="$(grep -m 1 '^[[:space:]]*password:' < /opt/zammad/config/database.yml | sed -e 's/.*password:[[:space:]]*//g')"
   DB_SOCKET="$(grep -m 1 '^[[:space:]]*socket:' < /opt/zammad/config/database.yml | sed -e 's/.*socket:[[:space:]]*//g')"
   DB_ADAPTER="$(grep -m 1 '^[[:space:]]*adapter:' < /opt/zammad/config/database.yml | sed -e 's/.*adapter:[[:space:]]*//g')"
else
   # Skip this whole script if we can't find our database file
   echo "Warning: Could not find database.yml"
   exit 0
fi

if [ "${DB_HOST}x" == "x" ]; then
   DB_HOST="localhost"
fi
if [ -n "$(which psql 2> /dev/null)" ] && [ "${DB_ADAPTER}" == 'postgresql' ]; then
   if [ "${DB_PORT}x" == "x" ]; then
      DB_PORT="5432"
   fi
   if [ "${DB_SOCKET}x" == "x" ]; then
      pg_isready -q -h $DB_HOST -p $DB_PORT
      state=$?
   else
      pg_isready -q
      state=$?
   fi
elif [ -n "$(which mysql 2> /dev/null)" ] && [ "${DB_ADAPTER}" == 'mysql2' ]; then
   if [ "${DB_PORT}x" == "x" ]; then
      DB_PORT="3306"
   fi
   mysqladmin status -h $DB_HOST -P $DB_PORT -u $DB_USER -p$DB_PASS > /dev/null
   state=$?
fi

# Check error state to ensure database is online
if [[ $state -gt 0 ]]; then
   echo "!!! ERROR !!!"
   echo "Your database does not seem to be online!"
   echo "Please check your configuration in config/database.yml and ensure the configured database server is online."
   echo "Exiting Zammad package installation / upgrade - try again."
   exit 1
fi

# remove local files of the packages
if [ -n "$(which zammad 2> /dev/null)" ]; then
   PATH=/opt/zammad/bin:/opt/zammad/vendor/bundle/bin:/sbin:/bin:/usr/sbin:/usr/bin:

   RAKE_TASKS=$(zammad run rake --tasks | grep "zammad:package:uninstall_all_files")

   if [[ x$RAKE_TASKS == 'x' ]]; then
      echo "# Code does not yet fit, skipping automatic package uninstall."
      echo "... This is not an error and will work during your next upgrade ..."
      exit 0
   fi

   if [ "$(zammad run rails r 'puts Package.count.positive?')" == "true" ] && [ -n "$(which pnpm 2> /dev/null)" ]
&& [ -n "$(which node 2> /dev/null)" ]; then
      echo "# Detected custom packages..."
      echo "# Remove custom packages files temporarily..."
      zammad run rake zammad:package:uninstall_all_files
   fi
fi