Skip to content

[bug] Epub-fixer doesn't respect PUID/PGID settings #234

@gravity182

Description

@gravity182

Describe the bug
It seems Epub-fixer runs with a default user (root) and doesn't use the PUID/PGID env vars. The Calibre itself does use them.

This issue is minor though. It doesn't affect the ingestion process. There's only one exception in the log:

Traceback (most recent call last):
  File "/app/calibre-web-automated/scripts/ingest_processor.py", line 12, in <module>
    from kindle_epub_fixer import EPUBFixer
  File "/app/calibre-web-automated/scripts/kindle_epub_fixer.py", line 31, in <module>
    file_handler = logging.FileHandler('/config/epub-fixer.log', mode='w')
  File "/usr/lib/python3.10/logging/__init__.py", line 1169, in __init__
    StreamHandler.__init__(self, self._open())
  File "/usr/lib/python3.10/logging/__init__.py", line 1201, in _open
    return open_func(self.baseFilename, self.mode,
PermissionError: [Errno 13] Permission denied: '/config/epub-fixer.log'

This file epub-fixer.log is created by epub-fixer with the root user as an owner and is not accessible by Calibre due to permission issues.

To Reproduce
Steps to reproduce the behavior:

  1. Import any epub book

Expected behavior
There's no exception in the logs.

Configuration(please complete the following information):

  • OS: Ubuntu 22 + Kubernetes
  • Hardware: x86 server

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions