[Solved] Couldn't upload profile image.... Omnibus install

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.

HELP :wink:

Sincerely,

Emmanuel.

I’d enable DEBUG logging Mattermost logging - Mattermost documentation and then watch the Mattermost logs as I tried to do this.

What does ls -l /var/opt/mattermost/data tell you?

1 Like

Hi John, well I turned on DEBUG, but I am not getting much in:

total 4

drwxr-xr-x 3 root root 4096 Feb 18 14:30 users

and that’s because after redoing the permissions commands above, I thought ok I will manually create the folders:

data —>
data —> users —>
data —> users —> gb8h3p8ia3g5fr1oi5778ors1h —>
data —> users —> gb8h3p8ia3g5fr1oi5778ors1h —> image

but ALL those folders are EMPTY ;(

and I am still getting the same Couldn’t upload profile image error.

;(

I ran the command: sudo apt remove --purge mattermost mattermost-omnibus and then reinstalled Mattermost and now it seems to be working fine.

No more error message…

Thanks for trying to help but the remove/re-install worked.

Sincerely,

Miichelle

1 Like

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!