Package Details: paperless-ngx 2.7.2-1

Git Clone URL: https://aur.archlinux.org/paperless-ngx.git (read-only, click to copy)
Package Base: paperless-ngx
Description: A supercharged version of paperless: scan, index and archive all your physical documents
Upstream URL: https://docs.paperless-ngx.com/
Licenses: GPL3
Conflicts: paperless, paperless-ng
Provides: paperless, paperless-ngx
Submitter: AlphaJack
Maintainer: AlphaJack (atomicfs)
Last Packager: atomicfs
Votes: 22
Popularity: 0.45
First Submitted: 2022-03-11 10:18 (UTC)
Last Updated: 2024-04-11 13:53 (UTC)

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 8 9 Next › Last »

pipep commented on 2023-12-02 08:54 (UTC) (edited on 2023-12-02 09:08 (UTC) by pipep)

After upgrading from 1.17.4 to 2.0.1 I am unable to open any view (documents, inbox, etc.). I get this error:

[WARNING] [paperless.api] An error occurred listing search results: no such table: documents_customfieldinstance

Edit: solved by running

sudo -u paperless paperless-manage migrate

StefanT commented on 2023-11-27 06:33 (UTC)

Until paperless-ngx is updated it helps to downgrade python-ipware to the previous version 0.9.0

bjo commented on 2023-11-26 20:26 (UTC) (edited on 2023-11-26 20:48 (UTC) by bjo)

Seems like something wrong with ipware:

Traceback (most recent call last):
  File "/usr/bin/paperless-manage", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/lib/python3.11/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "/usr/lib/python3.11/site-packages/django/core/management/__init__.py", line 416, in execute
    django.setup()
  File "/usr/lib/python3.11/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/lib/python3.11/site-packages/django/apps/registry.py", line 91, in populate
    app_config = AppConfig.create(entry)
                 ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/django/apps/config.py", line 123, in create
    mod = import_module(mod_path)
          ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/share/paperless/src/paperless/apps.py", line 4, in <module>
    from paperless.signals import handle_failed_login
  File "/usr/share/paperless/src/paperless/signals.py", line 4, in <module>
    from ipware import IpWare
ModuleNotFoundError: No module named 'ipware'

Fix in https://github.com/paperless-ngx/paperless-ngx/pull/4446

amo commented on 2023-11-21 22:44 (UTC)

@MarsSeed: Thank you for your remarks. I don't think the onboarding experience for paperless-ngx on archlinux is any bad. Just read carefully what is written on the paperless archwiki. The highlighted note in the Configuration section clearly states that there is no need to run paperless-manage as root. You are meant to run it as the paperless user, which is reasonable as @hashworks already pointed out. Having dedicated system users for separate applications is standard security practice.

MarsSeed commented on 2023-11-21 20:39 (UTC)

+1 remark: I came here after trying to build its alternatives, the legacy papermerge, and the successor, papermerge-core.

But both failed, disappointingly. Their upstream project apparently does not support the current Python version and environment that is available on Arch.

So I've recommended this package for users of the old papermerge. The fact alone that this complex build was a full success was in itself very encouraging!

The idea about the privilege checking wrapper that I've recommended would lead to a much better "onboarding" experience for new people trying this one out for the first time, instead of the long exception stack trace.

Btw, I think that /etc/paperless.conf does not contain any sensitive data, so it might not be harmful to give read access to that at least, to all users.

MarsSeed commented on 2023-11-21 20:02 (UTC)

Thank you for enlightening me about this.

But in that case, wouldn't it be good to implement some kind of minimal wrapper that checks if the needed resources are accessible for the current user? And if not, the wrapper would just return a message about insufficient read privileges. Instead of the current wall of text consisting of the Python exception stack trace.

I know it is more of an upstream issue, but this should be very easy to implement even in Bash.

Just an improvement idea on my part. Feel free to do or not do anything with it. :)

Anyway, thank you for maintaining it. I am not currently a user of this, but I can see potential in this for myself at a later time.

hashworks commented on 2023-11-21 18:31 (UTC) (edited on 2023-11-21 18:32 (UTC) by hashworks)

It makes absolute sense that no other users on a server can read /var/lib/paperless/data/, it's quite personal data.

Try sudo -u paperless -H paperless-manage.

MarsSeed commented on 2023-11-21 15:30 (UTC)

Hi! Me again.

I am just an outsider when it comes to this server application, but I'd like to give some packaging feedback that might be useful to others.

The way this is installed, some files / dirs don't have read access for users.

Consequently, running paperless-manage without superuser privileges just leads to crash due to Python exceptions because of read access denials by the file system.

The resources that are need for paperless-manage to read without su/sudo are:

/etc/paperless.conf # (file exists but not readable)
/var/lib/paperless/data/ # (directory)
/var/lib/paperless/data/log/ # (this dir does not even exist by default)

If you decided to add read privileges for these, and also created a new empty dir /var/lib/paperless/data/log/ with those privileges, then paperless-manage would be able to run as a regular user, and would display its basic commands and configuration options.

amo commented on 2023-09-23 19:58 (UTC)

@MarsSeed: good catch, thank you! I just removed it from the dependencies and updated to 1.17.4.

MarsSeed commented on 2023-09-23 19:46 (UTC)

python-aioredis1 is no longer needed as a dependency.