Resolving Shared Folder Issues in Nextcloud » History » Revision 2
Revision 1 (Gareth Eaton, 12/21/2023 02:21 PM) → Revision 2/3 (Gareth Eaton, 12/21/2023 02:47 PM)
h1. 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: <pre> cd /var/www/html/nextcloud </pre> 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: To trigger a files scan to refresh the file list: <pre> sudo -u www-data php occ files:scan --all </pre> The "sharing:delete-orphan-shares" command in Nextcloud is used to clean up and To list shares: <pre> sudo -u www-data php occ sharing:list </pre> To 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. a share by its ID: <pre> sudo -u www-data php occ sharing:delete-orphan-shares sharing:delete <share_id> </pre> Remember to replace <share_id> with the actual share ID you want to delete.