Unable to change avatar
Solved
Support
-
Hi,
I'm trying to update my profile avatar but on save the following JS error is thrown:
Anything I can do about this?
Thanks!
-
@klawitterb It seems rename() is not allowed on your filesystem/server. Is there anything special about your setup? What file system are you using? Maybe you can give us
df -h
output.What's happening is the avatar gets uploaded to /tmp. And then it gets renamed from there to profile. But the rename system call is failing.
-
@klawitterb Ah, I see. /tmp (as part of /) and /home are in different partitions.
I have made a fix for the next release (https://git.cloudron.io/cloudron/box/-/commit/370485eee668a08c4b63642c5afe6a1905cae3ee). You can fix it like so:
- Edit
/home/yellowtent/box/src/users.js
. In line 828 or so, inside setAvatar function, there is afs.rename
. Just change it tofs.copyFile
. The actual patch also removes the temp file but you can ignore the unlink stuff. systemctl restart box
- Edit