this sounds like a permission problem - can you verify that you changed the file ownership of your deployed files to the mattermost application user? Not sure about your deployment method, but if you chose the binary deployment and followed the official instructions, you should have a directory called /opt/mattermost and there should be a useraccount called mattermost and all files below this folder should be owned by that user.
You can ensure that by running the command chown -R mattermost: /opt/mattermost again.