Permission Denied on Watch Folder

When things doesn't work as they should.
Post Reply
Dan
Posts: 1
Joined: Mon Sep 10, 2018 7:00 pm

Permission Denied on Watch Folder

Post by Dan » Mon Sep 10, 2018 7:05 pm

Hi there, I am hoping someone can help me figure out how to fix the issue of permission denied when trying to scan the watch folder. This folder is a remote network share that has been mapped to a local folder in Ubuntu. /media/windowsshare. I know I need to change permission for that folder but I can't identify which user Mayan is using to try to access that folder. I have tried several , to no avail.
Remote folder requires a password as well, but that is handled when mounting to the local folder and I don't believe that is a problem.
Thanks in advance for any help on this matter.

eddi1984
Posts: 5
Joined: Sat Sep 08, 2018 3:55 am

Re: Permission Denied on Watch Folder

Post by eddi1984 » Mon Sep 10, 2018 10:28 pm

Mayan will run with "www-data" or "mayan" user, depending on your setup (or a custom user depending how you installed it).

After importing, mayan will delete the files from the watch folder. You will have to allow the above (or your custom user) to have full access (read/delete) to that watch folder.

Had the same issues, setting the appropriate permissions solved it for me.

Cheers,

Eddi

gargantvan
Posts: 12
Joined: Thu Sep 06, 2018 10:57 pm

Re: Permission Denied on Watch Folder

Post by gargantvan » Mon Sep 10, 2018 11:00 pm

I have the same setup even more my folder which is shared by Nextcloud over Webdav, I use Scanbot app to save to this webdav, then Mayan takes care of the rest.

You can probably use volumes to take control of the watchfolder inside docker image. I use a separate volume(not the default defined by the mayan docker setup), that way I can control permissions better,

Use docker volume command (-v) pass a folder to Mayan, then use that folder inside Mayan to set as watchfolder source.

This folder is used in Mayan settings "/var/lib/mayan/WatchFolder" and I use docker volume to connect to a physical drive.

I hope this helps.

koen
Posts: 6
Joined: Sun Feb 24, 2019 7:11 pm

Re: Permission Denied on Watch Folder

Post by koen » Sun Feb 24, 2019 7:57 pm

I installed Mayan on a synology NAS and I'm experiencing a permission denied error [errno 13] as well, trying to access a staging folder.
The specified host folder on the NAS, where i scan my files to, is mounted-successfully in the docker (at least I think so since I'm no longer getting the errno 2, no such file).

I know how to change user permissions on the host via ssh or DSM (synology), but there is no user called www-data or mayan. Do I need to create such a user on the host itself?
I can't get there inside the container since I don't know how to find the volume in a terminal inside the dockercontainer

A step by step tutorial would be highly appreciated.

--Part of me is afraid I'm missing something else here, since I don't see this step explained in the official setup documentation but also found very few hit searching for error no 13..



Edit: SOLVED after all:

Seems I wasn't missing anything, just not doing it right the first time(s).

Below are the steps I followed, in case any fellow-newbie finds this topic
since I'm not an expert at all, I'm not sure this is the safest way (PLEASE COMMENT IF NOT!!!) but it works...

stop your container in synology DSM
in container settings map the desired folder or volume to any folder name in your container (I used the same name from the host file system)
restart the container and locate your staging or watch folder in a docker terminal (either via SSH or via synology DSM -> docker -> mayan container -> details)
enter these 2 commands:
chown www-data:www-data <folder>
chmod 777 <folder> ---Question: would 775 will be okay to?

your system will not return anything, if in doubt you can check the results with this command:
ls -ld <folder>

Post Reply