Can't update from 7.1.5 to 7.2.1

The command will only output something if there are errors, but it will not tell you if it changed something, so by just running this command, we do not know if there were missing permissions earlier, but we made sure that they are now correct.

OK, this explains a lot. The default configuration for the setting FileSettings.Directory is ./data which means that a directory named data will be created in the current working directory of the application.
The only reason how this could happen in your scenario, is when you started mattermost directly from within the bin subfolder, when you should start it from the parent directory.
When following the setup recommendations, you should end up with a folder called /opt/mattermost which is the home of your Mattermost installation. In there, you will find all the relevant directories like data, bin, logs, config, etc.
What method do you use to start Mattermost? Did you create your own systemd unit or any other script to do that? If so, please show us either your systemd unit or the script you used.
Most likely the working directory is not set correctly, see here for some examples:

This invocation is wrong, since the current working directory (cwd) will be the /opt/mattermost/bin folder and when you start Mattermost in there, it will create a folder data in /opt/mattermost/bin because of the configuration value in your config.json. Also all other configuration variables, plugin directories, etc. cannot be found because they are also specified by relative values in your config/config.json which is probably what you’re seeing in your error logs now.

cd /opt/mattermost/bin
./mattermost

This is how it should be:

cd /opt/mattermost
bin/mattermost

You will probably have some data in the /opt/mattermost/data directory now and some in the /opt/mattermost/bin/data directory and it will be a bit tricky to merge these two now. In order to get an idea of what we’re dealing with, I’d need the output of the following command (which is probably quite large, so we’re dumping the output in a file called dir-listing.txt in the directory /tmp which you could then attach here or upload it anywhere for me to look at):

ls -lR /opt/mattermost > /tmp/dir-listing.txt
1 Like