mattermost-docker icon indicating copy to clipboard operation
mattermost-docker copied to clipboard

Unable to activate plugins

Open dragonpil opened this issue 5 years ago • 1 comments

Mattermost Version: 5.21.0 Checkout from commit ed682904c0218d03ca98771492ea6c2d7afecd85

running docker-compose with user 2000:2000 changed all files to be owned by 2000:2000

what ever plugin I try to install, it becomes uploaded. It also belongs to user 2000, it is executable but when it comes to activation of the plugin i get the following issue:

{"level":"error","ts":1584715864.5806115,"caller":"mlog/log.go:175","msg":"Unable to activate plugin","plugin_id":"com.mattermost.voice","error":"unable to start plugin: com.mattermost.voice: fork/exec plugins/com.mattermost.voice/server/dist/plugin-linux-amd64: permission denied","errorVerbose":"fork/exec plugins/com.mattermost.voice/server/dist/plugin-linux-amd64: permission denied\nunable to start plugin: com.mattermost.voice\ngithub.com/mattermost/mattermost-server/v5/plugin.(*Environment).Activate\n\tgithub.com/mattermost/mattermost-server/v5@/plugin/environment.go:270\ngithub.com/mattermost/mattermost-server/v5/app.(*App).SyncPluginsActiveState\n\tgithub.com/mattermost/mattermost-server/v5@/app/plugin.go:115\ngithub.com/mattermost/mattermost-server/v5/app.(*App).InitPlugins\n\tgithub.com/mattermost/mattermost-server/v5@/app/plugin.go:148\ngithub.com/mattermost/mattermost-server/v5/app.(*Server).RunOldAppInitialization.func6\n\tgithub.com/mattermost/mattermost-server/v5@/app/server_app_adapters.go:151\ngithub.com/mattermost/mattermost-server/v5/config.(*emitter).invokeConfigListeners.func1\n\tgithub.com/mattermost/mattermost-server/v5@/config/emitter.go:35\nsync.(*Map).Range\n\tsync/map.go:333\ngithub.com/mattermost/mattermost-server/v5/config.(*emitter).invokeConfigListeners\n\tgithub.com/mattermost/mattermost-server/v5@/config/emitter.go:33\ngithub.com/mattermost/mattermost-server/v5/config.(*commonStore).set\n\tgithub.com/mattermost/mattermost-server/v5@/config/common.go:90\ngithub.com/mattermost/mattermost-server/v5/config.(*FileStore).Set\n\tgithub.com/mattermost/mattermost-server/v5@/config/file.go:108\ngithub.com/mattermost/mattermost-server/v5/app.(*Server).UpdateConfig\n\tgithub.com/mattermost/mattermost-server/v5@/app/config.go:53\ngithub.com/mattermost/mattermost-server/v5/app.(*App).UpdateConfig\n\tgithub.com/mattermost/mattermost-server/v5@/app/config.go:59\ngithub.com/mattermost/mattermost-server/v5/app.(*App).EnablePlugin\n\tgithub.com/mattermost/mattermost-server/v5@/app/plugin.go:327\ngithub.com/mattermost/mattermost-server/v5/api4.enablePlugin\n\tgithub.com/mattermost/mattermost-server/v5@/api4/plugin.go:288\ngithub.com/mattermost/mattermost-server/v5/web.Handler.ServeHTTP\n\tgithub.com/mattermost/mattermost-server/v5@/web/handlers.go:177\ngithub.com/NYTimes/gziphandler.GzipHandlerWithOpts.func1.1\n\tgithub.com/NYTimes/[email protected]/gzip.go:336\nnet/http.HandlerFunc.ServeHTTP\n\tnet/http/server.go:2007\ngithub.com/gorilla/mux.(*Router).ServeHTTP\n\tgithub.com/gorilla/[email protected]/mux.go:212\ngithub.com/mattermost/mattermost-server/v5/app.(*RateLimiter).RateLimitHandler.func1\n\tgithub.com/mattermost/mattermost-server/v5@/app/ratelimit.go:108\nnet/http.HandlerFunc.ServeHTTP\n\tnet/http/server.go:2007\nnet/http.serverHandler.ServeHTTP\n\tnet/http/server.go:2802\nnet/http.(*conn).serve\n\tnet/http/server.go:1890\nruntime.goexit\n\truntime/asm_amd64.s:1357"}

dragonpil avatar Mar 20 '20 15:03 dragonpil

I rechecked again everything and logged into the app container: here the example with the matterpoll plugin

~/plugins/com.github.matterpoll.matterpoll/server/dist $ whoami mattermost ~/plugins/com.github.matterpoll.matterpoll/server/dist $ id -u mattermost 2000 ~/plugins/com.github.matterpoll.matterpoll/server/dist $ ls -lna total 57312 drwxr--r-- 2 2000 2000 4096 Mar 22 15:24 . drwxr--r-- 3 2000 2000 4096 Mar 22 15:24 .. -rwxr-xr-x 1 2000 2000 19523120 Mar 22 15:24 plugin-darwin-amd64 -rwxr-xr-x 1 2000 2000 19771658 Mar 22 15:24 plugin-linux-amd64 -rwxr-xr-x 1 2000 2000 19375104 Mar 22 15:24 plugin-windows-amd64.exe ~/plugins/com.github.matterpoll.matterpoll/server/dist $ ./plugin-linux-amd64 /bin/sh: ./plugin-linux-amd64: Permission denied

so if that does get a Permission denied than its no wonder that the execution also don't work via the systemconsole

Any idea what they all are doing internally does they need to read / write to some other folder which is maybe write protected?

dragonpil avatar Mar 22 '20 14:03 dragonpil