We're Hiring!

Mattermost, Inc.

Plugins not loading

Hi everybody,
i made a fresh install of Mattermost 5.33 on Ubuntu 20.04 LTS but a cannot load plugins i think due to the /plugins and /client/plugins “permission denied” issue.
Can you please help me to solve this problem?
I searched on the forum but i didn’t find a solution.
Here the error log:

{"level":"error","ts":1617894859.7185578,"caller":"app/plugin.go:288","msg":"Failed to sync plugin from file store","bundle":"plugins/com.mattermost.webex.tar.gz","error":"installExtractedPlugin: Unable to move plugin from temporary directory to final destination. Another plugin may be using the same directory name., destination already exists"}

{"level":"error","ts":1617894864.1574545,"caller":"app/plugin.go:843","msg":"Failed to install prepackaged plugin","path":"/opt/mattermost/prepackaged_plugins/mattermost-plugin-channel-export-v0.2.2-linux-amd64.tar.gz","error":"Failed to install extracted prepackaged plugin /opt/mattermost/prepackaged_plugins/mattermost-plugin-channel-export-v0.2.2-linux-amd64.tar.gz: installExtractedPlugin: Unable to move plugin from temporary directory to final destination. Another plugin may be using the same directory name., destination already exists","errorVerbose":"installExtractedPlugin: Unable to move plugin from temporary directory to final destination. Another plugin may be using the same directory name., destination already exists\nFailed to install extracted prepackaged plugin /opt/mattermost/prepackaged_plugins/mattermost-plugin-channel-export-v0.2.2-linux-amd64.tar.gz\ngithub.com/mattermost/mattermost-server/v5/app.(*App).processPrepackagedPlugin\n\tgithub.com/mattermost/mattermost-server/v5/app/plugin.go:895\ngithub.com/mattermost/mattermost-server/v5/app.(*App).processPrepackagedPlugins.func2\n\tgithub.com/mattermost/mattermost-server/v5/app/plugin.go:841\nruntime.goexit\n\truntime/asm_amd64.s:1374"}

{"level":"error","ts":1617894864.7765427,"caller":"app/plugin.go:843","msg":"Failed to install prepackaged plugin","path":"/opt/mattermost/prepackaged_plugins/mattermost-plugin-nps-v1.1.0-linux-amd64.tar.gz","error":"Failed to install extracted prepackaged plugin /opt/mattermost/prepackaged_plugins/mattermost-plugin-nps-v1.1.0-linux-amd64.tar.gz: installExtractedPlugin: Unable to move plugin from temporary directory to final destination. Another plugin may be using the same directory name., destination already exists","errorVerbose":"installExtractedPlugin: Unable to move plugin from temporary directory to final destination. Another plugin may be using the same directory name., destination already exists\nFailed to install extracted prepackaged plugin /opt/mattermost/prepackaged_plugins/mattermost-plugin-nps-v1.1.0-linux-amd64.tar.gz\ngithub.com/mattermost/mattermost-server/v5/app.(*App).processPrepackagedPlugin\n\tgithub.com/mattermost/mattermost-server/v5/app/plugin.go:895\ngithub.com/mattermost/mattermost-server/v5/app.(*App).processPrepackagedPlugins.func2\n\tgithub.com/mattermost/mattermost-server/v5/app/plugin.go:841\nruntime.goexit\n\truntime/asm_amd64.s:1374"}

thanks
Regards
Massimo

Hello! Can you confirm that your files are owned by the Mattermost user and Mattermost group in the /opt/mattermost directory, as well as in all subfolders and files?

These are the permissions on /opt/mattermost:

administrator@mattermost:~$ ls -l /opt/mattermost
total 284
drwxrwxr-x 2 mattermost mattermost 4096 Mar 31 12:56 bin
drwxrwxr-x 7 mattermost mattermost 4096 Apr 7 13:26 client
drwxrwxr-x 3 mattermost mattermost 4096 Apr 8 11:22 config
drwxrwxr-x 6 mattermost mattermost 4096 Apr 8 16:51 data
-rw-rw-r-- 1 mattermost mattermost 2052 Mar 31 12:55 ENTERPRISE-EDITION-LICENSE.txt
drwxrwxr-x 2 mattermost mattermost 4096 Mar 31 12:55 fonts
drwxrwxr-x 2 mattermost mattermost 4096 Apr 8 08:48 i18n
drwxrwxr-x 2 mattermost mattermost 4096 Apr 7 15:14 logs
-rw-rw-r-- 1 mattermost mattermost 903 Mar 31 12:55 manifest.txt
-rw-rw-r-- 1 mattermost mattermost 230476 Mar 31 12:55 NOTICE.txt
drwxr–r-- 5 mattermost mattermost 4096 Apr 8 16:52 plugins
drwxrwxr-x 2 mattermost mattermost 4096 Mar 31 12:56 prepackaged_plugins
-rw-rw-r-- 1 mattermost mattermost 6397 Mar 31 12:55 README.md
drwxrwxr-x 2 mattermost mattermost 4096 Mar 31 12:55 templates

These are the permissions on /opt/mattermost/plugins/

administrator@mattermost:~$ ls -l /opt/mattermost/plugins/
ls: cannot access ‘/opt/mattermost/plugins/com.mattermost.plugin-channel-export’: Permission denied
ls: cannot access ‘/opt/mattermost/plugins/com.mattermost.nps’: Permission denied
ls: cannot access ‘/opt/mattermost/plugins/com.mattermost.webex’: Permission denied
total 0
d??? ? ? ? ? ? com.mattermost.nps
d??? ? ? ? ? ? com.mattermost.plugin-channel-export
d??? ? ? ? ? ? com.mattermost.webex

Thanks
Massimo

Hello, @Massimo

Can you please run the following command first and then observe if you are still facing the same issue when you are attempting to load the plugins?

sudo chown -R mattermost:mattermost /opt/mattermost

Run the tail -f /opt/mattermost/log/mattermost.log command to observe while you attempt to reproduce the issue again after you run the command above.

1 Like

Hi @ahmaddanial ,
the command seems to have solved the issue, now the plugins are activated and working.
Thanks for your help.

Regards
Massimo

1 Like

Hi, @Massimo

You are most welcome. Happy to help!

1 Like