Project

General

Profile

Resolving Shared Folder Issues in Nextcloud » History » Version 3

Gareth Eaton, 12/21/2023 02:48 PM

1 1 Gareth Eaton
h1. Resolving Shared Folder Issues in Nextcloud
2
3
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.
4
5
Change Directory to the Nextcloud Installation:
6
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:
7
8
9
<pre>
10
cd /var/www/html/nextcloud
11
</pre>
12
Replace "/var/www/html/nextcloud" with the actual path to your Nextcloud installation.
13
14
Run Nextcloud Command-Line Tools:
15
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:
16
17 3 Gareth Eaton
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. 
18 1 Gareth Eaton
19
<pre>
20 3 Gareth Eaton
sudo -u www-data php occ sharing:delete-orphan-shares
21 1 Gareth Eaton
</pre>
22 3 Gareth Eaton
 ---
23 1 Gareth Eaton
24 3 Gareth Eaton
To trigger a files scan to refresh the file list:
25 1 Gareth Eaton
26
<pre>
27 3 Gareth Eaton
sudo -u www-data php occ files:scan --all
28 1 Gareth Eaton
</pre>