Failed to install While pulling app from remote flathub: open(O_TMPFILE): Permission denied

I got this message when i try to install Thuderbird or any software with terminal

error: Failed to install org.mozilla.Thunderbird: While pulling app/org.mozilla.Thunderbird/x86_64/stable from remote flathub: open(O_TMPFILE): Permission denied

can someone help me?

(sorry for bad english)

nevermind i figure it out

first, change permissions on /var/tmp from 755 to 777.
now run this command:

$ sudo chmod -R "ugo=rwX" /var/lib/flatpak/repo

and this too

$ flatpak repair --user

done, your flatpak should be fine now