• Chevereto Support

    General support checklist

    1. 🎛Confirm that your server meets the System Requirements
    2. 🔥Check for any available Hotfix
    3. 📚Read documentation - It will be required to Debug and understand Errors for a support response

    Requesting help

    1. 👑Purchase Extra Support to get direct email communication with the developer - Save yourself all the hassle of ticketing
    2. 🛎Open a Ticket - If you need software support
    3. 🐞Open a Bug - If you found something not working properly

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?
 

Hubertus

Chevereto Member
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?
 

Rodolfo

⭐ Chevereto Godlike
Chevereto Staff
Administrator
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.
 

Hubertus

Chevereto Member
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      |
 

Hubertus

Chevereto Member
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      |
 

Rodolfo

⭐ Chevereto Godlike
Chevereto Staff
Administrator
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.
 

svs

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

HenrysCat

💖 Chevereto Fan
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.
 

svs

Chevereto Member
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?
 

Wink

Chevereto Member
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;
    }
 

Rodolfo

⭐ Chevereto Godlike
Chevereto Staff
Administrator
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.
 
Top