• Remember to address to the Bug Tracking guidelines and to follow the instructions in the post ticket template.
  • Welcome to the Chevereto User Community!

    Here, users from all over the world come together to learn, share, and collaborate on everything related to Chevereto. It's a place to exchange ideas, ask questions, and help improve the software.

    Please keep in mind:

    • This community is user-driven. Always be polite and respectful to others.
    • Support development by purchasing a Chevereto license, which also gives you priority support.
    • Go further by joining the Community Subscription for even faster response times and to help sustain this space
  • Chevereto Support CLST

    Support response

    Support checklist

    • Got a Something went wrong message? Read this guide and provide the actual error. Do not skip this.
    • Confirm that the server meets the System Requirements
    • Check for any available Hotfix - your issue could be already reported/fixed
    • Read documentation - It will be required to Debug and understand Errors for a faster support response

Pending release Profile avatar/background temp files never removed from /tmp when using local legacy asset storage

Version
Chevereto 4.5.9
Website URL
https://imagem.app
PHP version
PHP 8.2
Database driver
MariaDB
Database version
11.0.2-MariaDB-1:11.0.2+maria~ubu2204 - mariadb.org binary distribution
Web browser
Chrome

mrladeia

Chevereto Member
Steps: with asset storage on the default local legacy storage (bucket = PATH_PUBLIC), upload a user avatar or background.

Expected: the temp files in sys_get_temp_dir() are removed after the upload.

Actual: av_* and bkg_* (plus .md) files stay in /tmp forever.

Cause: in User::uploadPicture(), the image is created in dirname(Upload::getTempNam()) and sent with AssetStorage::uploadFiles(). For local storage, LocalStorage:: put() uses copy(). The cleanup that unlinks the temp files only runs inside if (! AssetStorage::isLocalLegacy()), so in local legacy mode nothing removes the originals in /tmp.

Suggested fix:​

Always unlink the temp files ($uploaded['file'] and the .md variant) when they are not the final path, regardless of isLocalLegacy().
 
Hello, thank you for bringing this to my attention.

files stay in /tmp forever.
The /tmp folder is meant to be a short-term storage space. Your server normally clears it out on its own, either by removing files after they've sat there for a while or by emptying it when the server restarts. If files are piling up there, your server's automatic cleanup has most likely been turned off, or it has been set to keep files for a very long time before removing them.

This matters beyond Chevereto. Many other programs on your server use /tmp too, so when it never gets cleaned it can slowly fill your disk and cause problems elsewhere. I strongly recommend asking your hosting provider or server administrator to turn the automatic cleanup back on, so /tmp works the way it's supposed to.

in local legacy mode nothing removes the originals in /tmp
I have taken care of deleting these files for V5. In any case the general advice is that your /tmp works as expected.

Cheers,
Rodolfo.
 

Chevereto Cloud

Back
Top