Permission error with NFS volumes in docker #458
Replies: 13 comments 15 replies
-
Please try to write to these directories from within the paperless container as the paperless user. If this works, this is an issue with how paperless tries to determine whether or not it can write to a given directory. If not, see below. Paperless does the volume initialization as root, therefore, it works. Paperless also changes ownership of these files to the paperless system user, so that paperless can write there.
|
Beta Was this translation helpful? Give feedback.
-
Hey @jonaswinkler, thanks for your reply! The test you described looked like this, and imho worked as expected. I hope I got it right.
|
Beta Was this translation helpful? Give feedback.
-
That's the default. No need to configure that, it will change nothing.
That means that the python process in paperless is either not able to write there, or paperless fails to properly identify whether or not it's able to write there. Please do the following tests. Bring up a python shell inside the container:
Do the following commands and post the output:
Enter |
Beta Was this translation helpful? Give feedback.
-
Hello again, thanks for pointing out the UID/GID Mapping settings.
|
Beta Was this translation helpful? Give feedback.
-
I'm puzzled.
That's exactly the same check that paperless does to see if it can write to that directory. And when executed manually, it aparrently works, but when paperless does that, it fails and yields the error messages you're experiencing. paperless-ng/src/paperless/checks.py Line 24 in d8637ff |
Beta Was this translation helpful? Give feedback.
-
I replaced the entrypoint with /usr/bin/sleep 600 to have time for the tests. |
Beta Was this translation helpful? Give feedback.
-
I can confirm this happens with NFS shares. (why is NFS always the culprit if a container chokes on a volume?) Manually setting What strikes me odd is that my installation only had issues with the consumption directory:
In my case, I have a webdav container to add files to the consume directory.
Maybe the error only appears if two containers share the same directory and perhaps put a lock on it? As a workaround, I switched to a named volume. (default driver) This issue started to appear when I updated my container from 0.9.14 to I hope my findings are of any help. Edit; Here's my fstab. Maybe
I remember that my Plex installation also had loooots of issues with the nfs share because locks do not work properly with NFS. (even with the option removed) |
Beta Was this translation helpful? Give feedback.
-
Checked for related changes between 0.9.14 and 1.0.0 and there's nothing.
If these are not stored on NFS volumes, that would explain that. |
Beta Was this translation helpful? Give feedback.
-
@oliver-la Just checked, I also have nolock enabled.
|
Beta Was this translation helpful? Give feedback.
-
@FleischKarussel , @oliver-la And anyone else having issues with this. |
Beta Was this translation helpful? Give feedback.
-
I've converted the errors about permissions to warnings in the most recent version. Paperless will now start despite the error. This might help people who experienced issues with data / media folders stored on NFS shares. |
Beta Was this translation helpful? Give feedback.
-
I might have had a similar issue but I was using a CIFS volume.
When opening a shell into the container, I could create files in the export and consume dirs just fine as the root user.
I'm sure there's a logical reason but there isn't actually a paperless user inside the container oddly:
Attempting to After starting up docker-compose, I ran
The section More testing is required but I thought this might help someone else. |
Beta Was this translation helpful? Give feedback.
-
For Synology DSM users: FWIW, I seem to have fixed this (thanks to this post on Reddit) by giving my user (the one running |
Beta Was this translation helpful? Give feedback.
-
Hello everyone,
I'm fiddling around this issue for quite some time and don't have any clue why this happens only with paperlessng as I am running a bunch of services in containers side-by-side in the same manner completely fine.
Please see below, it seems like the permissions seem fine when container starts for the first time when initiating the volume but fails afterwards.
I even tried 777 for data and media folder on the nfs server.
Using local volumes works fine.
Is this an issue on my side or a bug in the directory hopping (/../ ?)
Best regards
FK
docker logs:
Filesystem permission in container:
Filesystem permissions on NFS server:
Beta Was this translation helpful? Give feedback.
All reactions