• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.
  • 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

Images not deleted from SFTP external storage

Hubertus

Chevereto Member
I've just enabled SFTP external storage, and upload is working.
Problem:
After deleting images from admin portal with Success, they are still remaining on remote storage.

How can I debug this?
 
I did see that, and used. Still no errors, can we trace what cheve is doing when I delete image from admin panel? What steeps are taken to delete image from SFTP? Is it working correctly on custom ports?

How we can solve problem with delete functionality, when cheve is not showing error?
 
Chevereto only communicates with your external server. If the target server doesn't respond or isn't working properly is something that you have to detect in the external server logs.

Most likely the permissions are wrong or you have something on top like a cache.

Check the queue table, if that's empty then your SFTP is not even reporting the errors back to Chevereto. If the table has several rows, pay attention to the attempts column, that tells you how many times Chevereto sent the delete command to your server and failed.

Knowing that I can hint you in the next step.
 
When I login to the target server using SFTP user, I can upload, change and delete files.
2238

queues table:
17206 rows, most are old. But few for delete from SFTP:

Code:
|    25396 | storage-delete | 2019-03-25 13:16:53 | {"key":"2019\/03\/25\/image_name.png","size":73186}                                                                                                                                             |          5 | 0              | pending      |
 
I did show you one example row in previous post, here are few of the latest:

Code:
|    25407 | storage-delete | 2019-03-27 13:39:22 | {"key":"2019\/03\/27\/name_xxx.jpg","size":910653}                                                                                                                                                                     |          5 | 0              | pending      |
|    25408 | storage-delete | 2019-03-27 13:39:22 | {"key":"2019\/03\/27\/name_xxx.th.jpg","size":"11083"}                                                                                                                                                                 |          5 | 0              | pending      |
|    25409 | storage-delete | 2019-03-27 13:39:22 | {"key":"2019\/03\/27\/name_xxx.md.jpg","size":"45154"}                                                                                                                                                                 |          5 | 0              | pending      |
|    25410 | storage-delete | 2019-03-28 13:27:42 | {"key":"2019\/03\/28\/name_xyz.jpg","size":1099452}                                                                                                                                                                   |          5 | 0              | pending      |
|    25411 | storage-delete | 2019-03-28 13:27:42 | {"key":"2019\/03\/28\/name_xyz.th.jpg","size":"8314"}                                                                                                                                                                 |          5 | 0              | pending      |
|    25412 | storage-delete | 2019-03-28 13:27:42 | {"key":"2019\/03\/28\/name_xyz.md.jpg","size":"258393"}                                                                                                                                                               |          5 | 0              | pending      |
 
The chv_queue table has this structure:

2243

And I'm expecting to see the all columns:

2244

queue_attempts counts the times that Chevereto tried to issue the delete command in your SFTP but failed. If you don't have any row with queue_attempts value means that your external server never reported back the error and just told "OK" to Chevereto.

Why your server does that is not something that I can answer you. Start by trying with other SFTP servers (in several different providers) and maybe compare them later to find your conflicting setting. Most likely your external SFTP is just rejecting

You could try sending me the SFTP credentials (private message) so I can test if I can replicate the issue or not, but if your external storage is the problem then I won't get any error either.
 
I've just enabled SFTP external storage, and upload is working.
Problem:
After deleting images from admin portal with Success, they are still remaining on remote storage.

How can I debug this?
Is there any progress in this issue? Same problem. External SFTP (OpenSSH) upload is OK, but files are not deleted. There are no errors anywhere, the queue table is empty.
 
I have tested this on my STFP storage and images ARE deleted, have you tried logging in to SFTP with the same account on an SFTP client such as Cyberduck, see if you can deleted the images yourself with that account, then you will know it's a permission problem.
 
It's very strange... I have already set the 0000 mask in the SFTP config. Not deleted. Tried the console client-OK. Even connected this SFTP to other script (Nextcloud, with the same account parameters and being on the same hosting) - from there too files are deleted without errors. Chevereto reports OK and files disappear from all visibility lists, but on SFTP remain. Where else can I check?
 
Try to open app/lib/classes/class.sftp.php and change function deleteMultiple() to this:

PHP:
    public function deleteMultiple(array $files=[])
    {
        $this->checkResource();
        if (count($files) == 0) {
            throw new SftpException("Missing or invalid array argument in " . __METHOD__, 200);
        }
        foreach ($files as $f) $this->sftp->delete($f, false);
        return $files;
    }
 
Try to open app/lib/classes/class.sftp.php and change function deleteMultiple() to this:

PHP:
    public function deleteMultiple(array $files=[])
    {
        $this->checkResource();
        if (count($files) == 0) {
            throw new SftpException("Missing or invalid array argument in " . __METHOD__, 200);
        }
        foreach ($files as $f) $this->sftp->delete($f, false);
        return $files;
    }
Let me know if this works. If does, I can add the command + the instructions used here.
 
Back
Top