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


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Solved Unable to change avatar

    Support
    avatar
    2
    5
    296
    Loading More Posts
    • 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.
    • klawitterb
      klawitterb last edited by girish

      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!

      girish 1 Reply Last reply Reply Quote 0
      • girish
        girish Staff @klawitterb last edited by

        @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 1 Reply Last reply Reply Quote 0
        • klawitterb
          klawitterb @girish last edited by

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

          girish 1 Reply Last reply Reply Quote 0
          • girish
            girish Staff @klawitterb last edited by girish

            @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
            klawitterb 1 Reply Last reply Reply Quote 0
            • klawitterb
              klawitterb @girish last edited by

              @girish makes sense 🙂

              Your workaround worked like a charm, thanks!

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Powered by NodeBB