Command "occ share:list" return " Node for share not found, fileid: XXXXX"

I have no support/technical question and have seen the support category. (Be aware that direct support questions will be deleted.)

on

Which general topic do you have

Hello,

The command “occ share:list” return the error message “Node for share not found, fileid: 61050” .

The command “occ sharing:list” do not failed but do not report fileid 61050.

When I request the database “select * from oc_share where item_source = ‘61050’;” it return a row with a filename (file_target" that do not more exists.

Can I remove (delete form oc_share where item_source = ‘61050’) this row without a database corruption ? OR ?

Best regards.
Francis

Hi Francis,

The error:
Node for share not found, fileid: 61050
means that Nextcloud still has a share entry in the table “oc_share”, but the corresponding file no longer exists in the filecache (oc_filecache).

A share becomes orphaned when for example:

  • a file was deleted
  • a folder was moved

Nextcloud does not always clean up these entries automatically. But please make a backup before doing the next steps - I can´t guarantee that.. :wink:

You can run:
DELETE FROM oc_share WHERE item_source = '61050';

If you want to double‑check first:
SELECT * FROM oc_share WHERE item_source = '61050';

If the file no longer exists in oc_filecache, the share is invalid and can be removed.

Please use the dedicated commands for cleanup:

sudo -u www-data php occ sharing:delete-orphan-shares

Hello,

Thank you Forest and tflidd,

tflidd the command “sudo -u www-data php occ sharing:delete-orphan-shares" do nothing.

Also there is a jobs “OCA\Files_Sharing\DeleteOrphanedSharesJob” that clean orphan shares.

Best regards.

Francis

You also have a files:cleanup command to check the file cache against the files in the file system.

Hello,

Thank You.

Finally I do that:

nextclouddb=> select * from oc_share where item_source = ‘XXXXXX’;

return one row.

nextclouddb=> select * from oc_filecache where fileid = ‘XXXXXX’;

return one row with a file in “trashbin” with not the same name above !?!

I asked the user to remove the file in its “trashbin” (find …/nextcloud/data …), now the first select return 0 rows.

I run the job “OCA\Files_Sharing\DeleteOrphanedSharesJob” (or occ sharing:delete-orphan-shares) , the second select return 0 rows

Now “occ share:list” return “Node for share not found, fileid: …” with another fileid.

Best regards.

Francis

1 Like

General rule:
Never make changes to the database!
Unless you know exactly what you are doing and have a backup of everything.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.