Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paperless thinks that consumption dir doesn't exist #369663

Open
MatthiasvB opened this issue Dec 31, 2024 · 6 comments
Open

Paperless thinks that consumption dir doesn't exist #369663

MatthiasvB opened this issue Dec 31, 2024 · 6 comments
Labels
0.kind: bug Something is broken

Comments

@MatthiasvB
Copy link

MatthiasvB commented Dec 31, 2024

Describe the bug

I'm trying to setup paperless, but it keeps failing to install with an incorrect error:

Steps To Reproduce

Steps to reproduce the behavior:

Use configuration

{
  config = {
    services = {
      paperless = {
        enable = true;
        dataDir = "/mnt/data/paperless";
        settings = {
          PAPERLESS_OCR_LANGUAGE = "deu+eng";
        };
        consumptionDir = "/mnt/data/share/feed_paperless";
        consumptionDirIsPublic = true;
        address = "0.0.0.0";
      };
    };
  };
}

where /mnt/data (obviously) is an external drive, mounted at boot. This should not play a role but who knows

then nixos-rebuild test --flake . --use-remote-sudo (errors), then sudo journalctl -xeu paperless-scheduler

observe error

A start job for unit paperless-scheduler.service has begun execution.
░░ 
░░ The job identifier is 10015.
Dez 31 13:59:43 m-testserver paperless-scheduler-pre-start[68833]: SystemCheckError: System check identified some issues:
Dez 31 13:59:43 m-testserver paperless-scheduler-pre-start[68833]: ERRORS:
Dez 31 13:59:43 m-testserver paperless-scheduler-pre-start[68833]: ?: PAPERLESS_CONSUMPTION_DIR is set but doesn't exist.
Dez 31 13:59:43 m-testserver paperless-scheduler-pre-start[68833]:         HINT: Create a directory at /mnt/data/share/feed_paperless
Dez 31 13:59:43 m-testserver systemd[1]: paperless-scheduler.service: Control process exited, code=exited, status=1/FAILURE

but

❯ ll /mnt/data/share
drwxrwxrwx     - root     root  31 Dez 13:58  feed_paperless/

Expected behavior

Paperless should work, as clearly the directory is being created and is present

Metadata

 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.63, NixOS, 24.11 (Vicuna), 24.11.20241229.5fd905e`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.24.10`
 - nixpkgs: `/nix/store/rr7d85v1y7fr32dpidnqj6qzschrxsfd-source`

Notify maintainers

@SuperSandro2000 @erikarvstedt


Note for maintainers: Please tag this issue in your PR.


Add a 👍 reaction to issues you find important.

@MatthiasvB MatthiasvB added the 0.kind: bug Something is broken label Dec 31, 2024
@MatthiasvB
Copy link
Author

I would be happy to investigate this further if somebody could give me a hint on where that error message is generated, as I couldn't find that. Clearly, some check is running there that returns incorrect results. I don't know who/what is running that check

@erikarvstedt
Copy link
Member

Can you share the result of running namei -l /mnt/data/share?

@MatthiasvB
Copy link
Author

Can you share the result of running namei -l /mnt/data/share?

❯ namei -l /mnt/data/share
f: /mnt/data/share
drwxr-xr-x root root  /
drwxr-xr-x root root  mnt
drwxrwxrwx root root  data
drwxrwx--- root users share

@MatthiasvB
Copy link
Author

MatthiasvB commented Dec 31, 2024

Ah that helped me fix it chmod o+x /mnt/data/share. So it's just a misleading error. I'd have expected "permission denied". I don't suppose this is something under nixpkgs control, is it?!

@MatthiasvB
Copy link
Author

Okay, so this runs now. But no "admin" superuser seems to be created. Had to do that imperatively

@SuperSandro2000
Copy link
Member

Maybe we could add that to tmpfiles.d? I wouldn't make it recursive as that potentially could take a long time at startup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

No branches or pull requests

3 participants