Summary
Just setup Mattermost Omnibus on Ubuntu 24.04 and went to update profile photo and getting Couldn’t upload profile image. error message… ;(
Steps to reproduce
How can we reproduce the issue (what version are you using?)
latest Mattermost Version: 10.4.2, Database Schema Version: 128, Build Number: 12918017578
Database: postgres
I read other posts about this error from 2023 but just got it in now in 2025. Did:
sudo chown -R mattermost:mattermost /var/opt/mattermost/data and
sudo chown -R mattermost:mattermost /var/opt/mattermost
and then sudo chmod -R g+w /var/opt/mattermost and then
sudo systemctl restart mattermost and still the same issue…
Expected behavior
The profile image updates and does not give an error.
Observed behavior
II immediatically receive an “Couldn’t upload profile image” error and the profli image show as broken.
According to this output the permissions still are wrong. I guess Mattermost runs as “mattermost” user, not as root - right? “drwxr-xr-x” means, that only root is able to “write”. You have to change the owner recursively to “mattermost:mattermost”.
I’d guess that the reinstall did exactly this: changed the ownership
To be accurate, you can have your mattermost binary and directory owned by any user… they just need to match. Our upgrade instructions assume a user called ‘mattermost’ and include steps to recursively change ownership… if you neglect the -R you can wind up with problems!