Resolving Shared Folder Issues in Nextcloud¶
If a shared folder is no longer available in Nextcloud but still appears for a user and they can't delete it, you can try the following steps to resolve the issue.
Change Directory to the Nextcloud Installation:
Before running any Nextcloud command-line tools, you typically need to navigate to the Nextcloud installation directory. You can do this using the cd command:
cd /var/www/html/nextcloud
Replace "/var/www/html/nextcloud" with the actual path to your Nextcloud installation.
Run Nextcloud Command-Line Tools:
Once you are in the Nextcloud installation directory, you can run Nextcloud's command-line tools using the appropriate user (usually "www-data" or "www"). For example:
The "sharing:delete-orphan-shares" command in Nextcloud is used to clean up and delete orphaned shares from the Nextcloud database. Orphaned shares are shares that are associated with files or folders that no longer exist in the Nextcloud storage or have become inaccessible for some reason.
sudo -u www-data php occ sharing:delete-orphan-shares
---
To trigger a files scan to refresh the file list:
sudo -u www-data php occ files:scan --all
Updated by Gareth Eaton 11 months ago · 3 revisions