Mattermost config error: Failed to update assets subpath from config
Summary
I have Mattermost installed as part of the gitlab omnibus. Mattermost logs an error relating to configuration of paths.
/var/log/gitlab/mattermost/mattermost.log:{"level":"error","ts":1591703023.1573215,"caller":"web/static.go:25","msg":"Failed to update assets subpath from config","error":"failed to update root.html with subpath /: open /opt/gitlab/embedded/service/mattermost/client/root.html: permission denied","errorVerbose":"open /opt/gitlab/embedded/service/mattermost/client/root.html: permission denied\nfailed to update root.html with subpath /\ngithub.com/mattermost/mattermost-server/v5/utils.UpdateAssetsSubpath\n\tgithub.com/mattermost/mattermost-server/v5@/utils/subpath.go:117\ngithub.com/mattermost/mattermost-server/v5/utils.UpdateAssetsSubpathFromConfig\n\tgithub.com/mattermost/mattermost-server/v5@/utils/subpath.go:162\ngithub.com/mattermost/mattermost-server/v5/web.(*Web).InitStatic\n\tgithub.com/mattermost/mattermost-server/v5@/web/static.go:24\ngithub.com/mattermost/mattermost-server/v5/web.New\n\tgithub.com/mattermost/mattermost-server/v5@/web/web.go:39\ngithub.com/mattermost/mattermost-server/v5/cmd/mattermost/commands.runServer\n\tgithub.com/mattermost/mattermost-server/v5@/cmd/mattermost/commands/server.go:77\ngithub.com/mattermost/mattermost-server/v5/cmd/mattermost/commands.serverCmdF\n\tgithub.com/mattermost/mattermost-server/v5@/cmd/mattermost/commands/server.go:53\ngithub.com/spf13/cobra.(*Command).execute\n\tgithub.com/spf13/cobra@v0.0.5/command.go:826\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\tgithub.com/spf13/cobra@v0.0.5/command.go:914\ngithub.com/spf13/cobra.(*Command).Execute\n\tgithub.com/spf13/cobra@v0.0.5/command.go:864\ngithub.com/mattermost/mattermost-server/v5/cmd/mattermost/commands.Run\n\tgithub.com/mattermost/mattermost-server/v5@/cmd/mattermost/commands/root.go:15\nmain.main\n\tgithub.com/mattermost/mattermost-server/v5@/cmd/mattermost/main.go:31\nruntime.main\n\truntime/proc.go:203\nruntime.goexit\n\truntime/asm_amd64.s:1357"}
The permissions and ownership of the file it mentions show that nobody except root can write to this file:
-rw-r--r-- 1 root root 3657 Jun 4 16:45 /opt/gitlab/embedded/service/mattermost/client/root.html
From the logs, it looks like this error happens repeatedly, or at least on every startup of Mattermost.
I don't know what the significance of this is - I've not noticed any particular effects - but it just sounds like it should not be happening.
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Debian 8.11 Current User: git Using RVM: no Ruby Version: 2.6.6p146 Gem Version: 2.7.10 Bundler Version:1.17.3 Rake Version: 12.3.3 Redis Version: 5.0.9 Git Version: 2.26.2 Sidekiq Version:5.2.7 Go Version: unknown GitLab information Version: 13.0.5 Revision: 9097f912ba5 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 11.7 URL: https://git.example.com HTTP Clone URL: https://git.example.com/some-group/some-project.git SSH Clone URL: git@ git.example.com:some-group/some-project.git Using LDAP: no Using Omniauth: yes Omniauth Providers: GitLab Shell Version: 13.2.0 Repository storage paths: - default: /var/opt/gitlab/git-data/repositories GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab subtasks ...Checking GitLab Shell ...
GitLab Shell: ... GitLab Shell version >= 13.2.0 ? ... OK (13.2.0) Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Internal API available: OK Redis available via internal API: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Gitaly ...
Gitaly: ... default ... OK
Checking Gitaly ... Finished
Checking Sidekiq ...
Sidekiq: ... Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Incoming Email ...
Incoming Email: ... Reply by email is disabled in config/gitlab.yml
Checking Incoming Email ... Finished
Checking LDAP ...
LDAP: ... LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab App ...
Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 2/1 ... yes 2/2 ... yes 14/4 ... yes 14/5 ... yes 2/6 ... yes 17/8 ... yes 14/9 ... yes 2/10 ... yes 14/11 ... yes 14/12 ... yes 14/13 ... yes 14/14 ... yes Redis version >= 4.0.0? ... yes Ruby version >= 2.5.3 ? ... yes (2.6.6) Git version >= 2.22.0 ? ... yes (2.26.2) Git user has default SSH configuration? ... yes Active users: ... 27 Is authorized keys file accessible? ... yes GitLab configured to store new projects in hashed storage? ... yes All projects are in hashed storage? ... yes
Checking GitLab App ... Finished
Checking GitLab subtasks ... Finished