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

Acces denied error #13 when using subdirs in consume folder (/usr/share/hassio/share/paperless/consume) #123

Closed
wfa001 opened this issue Mar 16, 2024 · 4 comments
Labels
duplicate This issue or pull request already exists good first issue Good for newcomers third-party This is related to an external component

Comments

@wfa001
Copy link

wfa001 commented Mar 16, 2024

when copying files (pdf) with WinSCP into the consume folder (tree with folders) paperless gives an error 13 access denied for the files in the subfolders. Files in the root folder /usr/share/hassio/share/paperless/consume are 'consumed' without any problems

PermissionError: [Errno 13] Permission denied: '/share/paperless/consume/Informationen/2022-07-04 Betriebsanleitung Notstromaggregat.pdf'
[2024-03-16 15:02:53,171] [ERROR] [celery.app.trace] Task documents.tasks.consume_file[1e6e0659-9383-4930-bebf-46140a851511] raised unexpected: ConsumerError("2022-07-04 Betriebsanleitung Notstromaggregat.pdf: The following error occurred while storing document 2022-07-04 Betriebsanleitung Notstromaggregat.pdf after parsing: [Errno 13] Permission denied: '/share/paperless/consume/Informationen/2022-07-04 Betriebsanleitung Notstromaggregat.pdf'")
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/dist-packages/asgiref/sync.py", line 349, in main_wrap
    raise exc_info[1]
  File "/usr/src/paperless/src/documents/consumer.py", line 740, in try_consume_file
    self.original_path.unlink()
  File "/usr/lib/python3.11/pathlib.py", line 1148, in unlink
    os.unlink(self)
@BenoitAnastay
Copy link
Owner

It's probably because the files arent created and thus owned by PID:GID 1000:1000 user

@BenoitAnastay BenoitAnastay added duplicate This issue or pull request already exists good first issue Good for newcomers third-party This is related to an external component labels Mar 16, 2024
@CR6-SE
Copy link

CR6-SE commented Mar 22, 2024

Same Problem here.

@BenoitAnastay
Copy link
Owner

You better use the paperless user and group ID to create the files and folder for consume directory

You can change default UID:PID of paperless in the add-on configuration tab, you can even use root (0:0)
Screenshot_20240323-225904

@CR6-SE
Copy link

CR6-SE commented Mar 24, 2024

So I place 1000 for UID and 1000 for GID
or even 0 for UID and 0 for GID (root)

Thx for your Work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists good first issue Good for newcomers third-party This is related to an external component
Projects
None yet
Development

No branches or pull requests

3 participants