Mattermost, Inc.

[Solved] No account images after upgrading

We upgraded from Mattermost-Enterprise 2.1 to 3.0.3 today.
After the upgrade all our profile pictures fail to load and its not possible to upload new profile pictures.
The logs give us this error message:
[2016/06/14 10:37:49 CEST] [EROR] /api/v3/users/tgmcxftf438eddoarezixackxy/image:WriteFile code=500 rid=zem5nbsfnp8rxq7wsrgc7p1ibr uid=3p3x4wawm3bnuje777kakcj8fy ip= Encountered an error creating the directory for the new file [details: mkdir data/users/tgmcxftf438eddoarezixackxy: permission denied]

/opt/mattermost/data-directory is owned by user mattermost and has write permission, tried to chmod 777 that directory with no luck.
Any clue on what is wrong?

Hi ZerxXes,

Can you check the permissions of the subfolders of the data directory, particularly data/users? The profile pictures were moved around as part of the upgrade process so it’s possible the owner got switched if the upgrade wasn’t done using the mattermost account.

I solved it, /opt/mattermost/data was not used at all it seems.
Instead it used /opt/mattermost/bin/data for storing images.
And indeed the permissions was broken for most of the directories in the mattermost folder, probably by the upgrade as you mentioned.
I redid: sudo chown -R mattermost:mattermost /opt/mattermost
and now it works again, thank you :slight_smile:

I’m facing same issue with latest mattermost build. Non of the given answers worked, even I have tried adding 777 permission for the path /opt/mattermost, but still no luck.