Directories shown in "shared with you", although they have been deleted (aka "ghost" folders)

Hi there!
(NC 17.0.1, PHP 7.2.19, PostgreSQL 10.10)

Today, when I was creating a new user, I just noticed something weird in the web interface:

users have several folders under “shared with you”, folders that do not exist anymore.

when I click on one of them , I am sent to the root folder and a message “This operation is forbidden” is shown.

these “ghost shares” are also listed as available folders in the root, when setting up the sync client on a desktop.

any idea how to cleanup these no-longer-existing “ghost shares” ?

thanks!!

is there some kind of fsck to fix this kind of ghost folders ?

Hi all,

after one month, unfortunately still no replies to this issue.

does anyone know of a possible solution ?

Thanks!

Hi

I am sorry to say that i cant help, but i have the same issue.

When i create a new user and logon with that user they get two shares (among the real ones)

HABBA
NCSHARE1

These two shares was shares i made when installing nextcloud 2 years ago. My files are cifs shared using “local” share in external storages in settings. The storage is on a mac computer.

I am pretty lame when it comes to linux, so i spent around xx hours trying to find out how to get rid of them (i gave up now).

I believe that this happened because i shared a folder on the mac with the storage called “habba”, then i shared to all users in my nextcloud. Then i probably just deleted the sahre on the mac.

I can open the folder “habba” in nextcloud, but get the error “could not create folder” if i try to do that :slight_smile:

As mentioned, i can not find anything in my nextcloud installation system containing “habba”… i tried searching inside the database with PgAdmin, but i suck bigtime there so cant find anything there as well :slight_smile:

I would think this should be a pretty straight forward thing to fix, but after my “xx” hours i simply gave up.

I run Ubuntu 20.04. The installation was originally HansonIT image and have been upgraded all the way to 21.0.4

Nobody that could help a lost soul? :cold_face:

Perhaps you can find it in your database e.g. MariaDB and delete it manually.

Yo!.. thanks for your answer @devnull

I am running pgSQL server (and my skills are really not good with databases). However i did install pgadmin and connected to the database (using the credentials in the nextcloud.config).

Tried to search for the words “habba” and “ncshare1” which exist somewhere.

Do you have any tip for how i can search (keep in mind i am totally useless with db language).

Again, thanks for answering.

I can see this in my audit log:

Info admin_audit The folder /habba with ID 3691 has been unshared from the group Regular users (Share ID: 92) 2023-01-29T10:17:34+0100
Info admin_audit The folder /NCSHARE1 with ID 450 has been unshared from the group Regular users (Share ID: 11) 2023-01-29T10:17:34+0100

I wish i was able to find these id´s somewhere so i could delete them :frowning:
ID 3691 and ID 450

Is anyone able to send me in the right direction? :sweat_smile: