When using a mattermost cli command the ownership of the plugins folder gets overwritten each time the mattermost binary is being run by a different user than the mattermost user.
While this can be worked around by using su mattermost or sudo -u mattermost it can be quite annoying and does confuse some customers and users of the software because plugins then stop showing up or stop working due to change in ownership of their files.
1. spin up a mm serve as usual
2. ssh onto the server
3. run any mattermost command as root or any user that is NOT the mattermost user
4. check the file permissions in the mattermost folder with ls -la
Observed: all files have the correct ownership (mattermost:mattermost) except for the plugins (root:root). Plugins disappear from the plugins list in the system console
Expected: nothing changes in regard to the ownership of the plugins and files in the directory, plugins stay in the system console and keep working as expected.