Filesystem permission issues after upgrade to 3.1.0

I upgraded from 3.0.x to 3.1.0 today. Updaring via the web UI failed, so I did

git pull
./launcher rebuild app

which finished fine, but all I got was an “invalid gateway” error when visiting the site.

I tracked this down to filesystem permission errors:

  • /var/www/discourse/tmp/pids was not writable, fixing that lead to
  • /etc/postgresql/13/main/pg_hba.conf not being readable.

Having fixed those made the site work, but user avatars were missing. Again a temporary directoyr was missing, so I made /var/www/discourse/tmp world-writable in the container.

That seems to have fixed the issues I am aware of, but there might be more things hiding in the dark.

Also, I saw this in the logs:

rror running git command: ["git", "rev-parse", "HEAD"] in /var/www/discourse/plugins/styleguide : Discourse::Utils::CommandError : /var/www/discourse/lib/discourse.rb:137:in `exec': fatal: detected dubious ownership in repository at '/var/www/discourse'
To add an exception for this directory, call:

	git config --global --add safe.directory /var/www/discourse

Has anything changed with 3.1? Given this is docker-based, I am surprised those issue come up… and so far I never had anything like that after upgrading.

I’m seeing similar symptoms - question, are you running any plugins?

I’m also getting the below error in my setup via docker.

Discourse::Utils::CommandError: /src/lib/discourse.rb:137:in `exec’: error Command “esbuild” not found.

1 Like

You need to run yarn first I suspect, to install dependencies.

2 Likes

I also faced a similar issue and running yarn fixed the issue.

2 Likes

With the latest update to 3.1.1 (which I ran using git pull ; ./launcher rebuild app) the problem seems to have been solved, the system started without any problems and the UI now behaves correctly. :tada:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.