Permission denied after update to 26.1

After updating from a version prior to 26.1 to Relution 26.1 or later, the Docker container no longer starts. The container log repeatedly shows the following error:

Exception in thread "main" java.lang.reflect.InvocationTargetException
Caused by: java.io.IOException: Permission denied
    at java.base/java.io.File.createTempFile(File.java:2184)
    at io.relution.boot.Main.checkTempDirectory(Main.java:291)
    at io.relution.boot.Main.main(Main.java:216)

Root Cause

Version 26.1 changed the user ID used in the Relution container due to updated security best practices. The existing temp directory (/tmp/relution.tmp, or $TMPDIR/relution.tmp if the TMPDIR environment variable is set) in the Docker volume is therefore owned by the wrong user. As of 26.1, Relution uses this directory as its temp directory and checks at startup whether it is writable. The Relution service therefore has no write access at startup and terminates. Unfortunately, this cannot be fixed automatically during the update.

On startup, the service checks access to the temp directory:

  • If it is not present, it will be created fresh with the correct permissions.
  • If it already exists, it is cleared.

The service then creates a test file to check that the directory is writable. This check fails with incorrect permissions.


Solution

The following command recreates the Relution container including its volume.

docker compose up -d --force-recreate --renew-anon-volumes --no-deps relution

If the container’s service name differs, relution is replaced accordingly.

After restarting, Relution will automatically recreate the relution.tmp directory with the correct permissions. The Permission denied error will no longer appear and the service will start normally.


Additional Notes

  • This issue occurs only when updating from a version prior to 26.1 to version 26.1 or later (e.g. directly from 26.0 to 26.5), as the directory already exists with outdated permissions.
  • Fresh installations of version 26.1 or later are not affected.
  • Relution clears relution.tmp at every startup. Files stored there are lost on restart.
  • If /tmp is mounted as a bind mount or named volume, or if TMPDIR is set, --renew-anon-volumes does not renew the directory. If the error persists in this case, the relution.tmp directory must be deleted. Relution recreates it with the correct permissions at the next startup.
  • On a Linux installation without Docker, the same error occurs if relution.tmp is owned by another user, for example after Relution was started as root. This is fixed with sudo chown -R relution:relution /tmp/relution.tmp, see Deprecated: Linux (Alma) →.

How helpful was this article?