mirror of
https://github.com/ciur/papermerge.git
synced 2026-04-25 12:05:58 +03:00
[GH-ISSUE #275] PDFs received via IMAP are broken #221
Labels
No labels
2.1
3.0
3.0.1
3.0.2
3.0.3
3.0.3
3.1
3.2
3.2
3.3
3.5
3.x
Fixed. Waiting for feedback.
Fixed. Waiting for feedback.
UX
Version 2.1 - alpha
XSS
announcement
beta
blocker
bug
cannot reproduce
confirmed
confirmed
critical
demo
dependencies
deployment
detchnical debt
discussion
docker
documentation
donations
duplicate
enhancement
feature request
frontend
fundraising
good first issue
good issue
help wanted
high
implemented
important
improvement
incomplete
invalid
investigation
kubernetes
low
low impact
medium
medium
medium impact
migration from 2.0
migration from 2.1
missing-language
missing-ocr-language
no-activity
note
ocr
outofscope
packaging
performance
popular request
pull-request
pypi
question
raspberry pi
roadmap
search
security
setup
status
task
technical debt
updates
user xp
version 1.4.0 - demo
will be implemented
will not be implemented
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/papermerge#221
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @HassanMullah on GitHub (Dec 28, 2020).
Original GitHub issue: https://github.com/ciur/papermerge/issues/275
Originally assigned to: @ciur on GitHub.
Hello, I have installed Papermerge 1.5.5 via Docker (Compose). I use Traefik as a reverse proxy. In the papermerge.conf.py of the worker I entered the IMAP host, the username and the password (otherwise I ignored the rest of the email settings - BTW, here you should do some work in the documentation and at least write in possible values and example).
If I now create a searchable PDF with my document scanner and send it via email, the PDF arrives in Papermerge after a short time. If I still view the PDF via IMAP access, everything is fine. But in Papermerge every PDF is broken, i.e. I don't see any content of the PDF.
Is this an error configuration on my part or a bug?
@w4tzmann commented on GitHub (Dec 28, 2020):
I had the simular problem with docker and mounted volumes. Do you use mounted volumes for the docker container? Then you will need to set the right permissions on the mounted folders on your docker host.
@HassanMullah commented on GitHub (Dec 29, 2020):
hello w4tzmann, here my docker-compose.yml:
version: '3.7' services: app: image: eugenci/papermerge:1.5.5 build: context: . dockerfile: app.dockerfile container_name: papermerge_app restart: always ports: - "8765:8000" depends_on: - db - redis volumes: - $PWD/media_root:/opt/media environment: - DJANGO_SETTINGS_MODULE=config.settings.production - POSTGRES_USER=dbuser - POSTGRES_PASSWORD=dbpass - POSTGRES_DB=dbname - POSTGRES_HOST=db - POSTGRES_PORT=5432 networks: - internet - intranet labels: - "traefik.enable=true" - "traefik.http.routers.papermerge.entrypoints=http" - "traefik.http.routers.papermerge.rule=Host(papermerge.domain.tld)" - "traefik.http.routers.papermerge.middlewares=https-redirect@file" - "traefik.http.routers.papermerge-sec.entrypoints=https" - "traefik.http.routers.papermerge-sec.middlewares=default-headers@file" - "traefik.http.routers.papermerge-sec.rule=Host(papermerge.domain.tld`)"- "traefik.http.routers.papermerge-sec.tls=true"
- "traefik.http.routers.papermerge-sec.tls.options=myTLSOptions@file"
- "traefik.http.routers.papermerge-sec.tls.certresolver=le"
db:
image: postgres:12.3
container_name: postgres_db
restart: always
volumes:
- $PWD/postgres_data:/var/lib/postgresql/data/
environment:
- POSTGRES_USER=dbuser
- POSTGRES_PASSWORD=dbpass
- POSTGRES_DB=dbname
networks:
- intranet
redis:
container_name: 'redis'
restart: always
image: 'redis:6'
ports:
- '127.0.0.1:6379:6379'
networks:
- intranet
volumes:
- '$PWD/redisdata:/data'
worker:
image: eugenci/papermerge-worker:1.5.5
build:
context: .
dockerfile: worker.dockerfile
container_name: papermerge_worker
restart: always
volumes:
- $PWD/media_root:/opt/media
environment:
- DJANGO_SETTINGS_MODULE=config.settings.production
- POSTGRES_USER=dbuser
- POSTGRES_PASSWORD=dbpass
- POSTGRES_DB=dbname
- POSTGRES_HOST=db
- POSTGRES_PORT=5432
networks:
- intranet
volumes:
postgres_data:
media_root:
redisdata:
networks:
intranet:
external: true
internet:
external: true
`
the 3 mounted volumes have that permissions:
drwxr-xr-x 2 root root 4.0K Dec 28 10:35 media_rootdrwx------ 19 systemd-coredump root 4.0K Dec 28 18:32 postgres_datadrwxr-xr-x 2 systemd-coredump root 4.0K Dec 29 05:52 redisdatawhat should i change?
this is first a test environment, later i would like to change to a mysql database, if possible.
@w4tzmann commented on GitHub (Dec 29, 2020):
Hello HassanMullah,
I did the following:
Open an interactiv session in the papermerge container (docker exec -it container_id /bin/bash)
Then show the user id (id -u) It should be 1001 (www)
Exit the container session.
Then i change the owner of media_root zu 1001 (chown 1001 media_root/)
After restarting the container all new files where archived correctly and were visible.
I running the volumes at the moment with this permissions:
I'm not a big docker and linux crack, so there is maybe a better solution ;)
@arminzaugg commented on GitHub (Jan 1, 2021):
The file papermerge.conf.py.example helped me a lot.