Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Cloudron Forum

Apps | Demo | Docs | Install

Unable to change avatar

Scheduled Pinned Locked Moved Solved Support
avatar
5 Posts 2 Posters 307 Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • klawitterbK Offline
    klawitterbK Offline
    klawitterb
    wrote on last edited by girish
    #1

    Hi,

    I'm trying to update my profile avatar but on save the following JS error is thrown:
    7f36c4d3-da6c-455c-98ef-6578bf60ff46-image.png

    Anything I can do about this?

    Thanks!

    girishG 1 Reply Last reply
    0
  • girishG Do not disturb
    girishG Do not disturb
    girish Staff
    replied to klawitterb on last edited by
    #2

    @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.

    klawitterbK 1 Reply Last reply
    0
  • klawitterbK Offline
    klawitterbK Offline
    klawitterb
    replied to girish on last edited by
    #3

    @girish hope this helps:
    61c9405f-7c46-4ea7-ad49-caee24da7291-image.png

    girishG 1 Reply Last reply
    0
  • girishG Do not disturb
    girishG Do not disturb
    girish Staff
    replied to klawitterb on last edited by girish
    #4

    @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 a fs.rename. Just change it to fs.copyFile. The actual patch also removes the temp file but you can ignore the unlink stuff.
    • systemctl restart box
    klawitterbK 1 Reply Last reply
    0
  • klawitterbK Offline
    klawitterbK Offline
    klawitterb
    replied to girish on last edited by
    #5

    @girish makes sense 🙂

    Your workaround worked like a charm, thanks!

    1 Reply Last reply
    0

  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Login

  • Don't have an account? Register

  • Login or register to search.