Leaving files in 'Watch Folder'

When things doesn't work as they should.
Post Reply
Posts: 9
Joined: Wed Aug 22, 2018 11:28 am

Leaving files in 'Watch Folder'

Post by Krzysztof » Thu Nov 08, 2018 11:16 am


Mayan does not remove files from 'Watch Folder' and adds the same files over and over again.

Is it possible to get around it or is it the 'Watch Folder' principle?


Posts: 64
Joined: Wed Aug 22, 2018 2:52 pm

Re: Leaving files in 'Watch Folder'

Post by KevinPawsey » Fri Nov 09, 2018 12:32 pm

I had this issue before, and I managed to pin the issue down to the following:

I was using a Mac to connect to an SMB share... it turns out that there is something in the way that the Mac writes to SMB shares. I used to get 2-3 copies of the same file because the file wasn't unlocked to be able to be deleted, so it remained in the folder to be re-scanned.

Not sure if this is your setup, but what improved the situation for me was to stop sharing the watched folder as SMB, and share it as AppleTalk, and that enabled the file lock to unlock properly and be deleted after the folder scan.

Hope that helps.

Running Mayan-EDMS on: OpenMediaVault, (Docker plugin), on x86 dual-core

Posts: 1
Joined: Mon Jan 28, 2019 10:16 am

Re: Leaving files in 'Watch Folder'

Post by teqqyde » Mon Jan 28, 2019 12:26 pm

I've got the same issue. I created a folder, installed apache2 and configured webdav. Now I'm using my Phone with the ScannerPro App and save the pdf to my webdav folder.
The pdf is recognised by the system, but leave for always there. The first time i recognised it, i got over 1200 documents from one pdf in Mayan.

So, is there any automatic workaround in Mayan to not run in the same issue another time? I cannot create a script to remove all files from this folder, because i can be deleted and not be indexed by mayan if the trigger "goes wrong".


User avatar
Posts: 181
Joined: Tue Aug 21, 2018 3:28 am

Re: Leaving files in 'Watch Folder'

Post by rosarior » Tue Jan 29, 2019 8:01 am

When this happens it is usually caused by a missing filesystem permission. Check to see if the Mayan system user account has the filesystem permission to delete files from the watch folder.

Post Reply