Unable to change avatar
-
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!
-
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 -houtput.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 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 -houtput.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.
@girish hope this helps:

-
@girish hope this helps:

@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
-
@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
@girish makes sense

Your workaround worked like a charm, thanks!
- Edit