[GH-ISSUE #353] Bugfix: django branch dockerfile "cannot create directory..." error #3271

Closed
opened 2026-03-14 21:52:15 +03:00 by kerem · 2 comments
Owner

Originally created by @walkero-gr on GitHub (Jul 7, 2020).
Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/353

Describe the bug

When starting the archivebox container, based on the dockerfile of django branch, I get the following error in logs and it exits

archive_archivebox   | mkdir: cannot create directory ���/home/archivebox���: Permission denied
archive_archivebox   | touch: cannot touch '/home/archivebox/.local/share/applications/mimeapps.list': No such file or directory
archive_archivebox   | [X] No archivebox index found in the current directory.
archive_archivebox   |     /data
archive_archivebox   |
archive_archivebox   |     Hint: Are you running archivebox in the right folder?
archive_archivebox   |         cd path/to/your/archive/folder
archive_archivebox   |         archivebox [command]
archive_archivebox   |
archive_archivebox   |     Hint: To create a new archive collection or import existing data in this folder, run:
archive_archivebox   |         archivebox init
archive_archivebox exited with code 2

I think the above error comes from the following line in dockerfile and because the user archivebox doesn't have the right permissions

RUN archivebox version

Steps to reproduce

  1. Build archive box image and run the container

Software versions

  • OS: macOS 10.14
  • ArchiveBox version: 1866da3
Originally created by @walkero-gr on GitHub (Jul 7, 2020). Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/353 #### Describe the bug When starting the archivebox container, based on the dockerfile of django branch, I get the following error in logs and it exits ```logs archive_archivebox | mkdir: cannot create directory ���/home/archivebox���: Permission denied archive_archivebox | touch: cannot touch '/home/archivebox/.local/share/applications/mimeapps.list': No such file or directory archive_archivebox | [X] No archivebox index found in the current directory. archive_archivebox | /data archive_archivebox | archive_archivebox | Hint: Are you running archivebox in the right folder? archive_archivebox | cd path/to/your/archive/folder archive_archivebox | archivebox [command] archive_archivebox | archive_archivebox | Hint: To create a new archive collection or import existing data in this folder, run: archive_archivebox | archivebox init archive_archivebox exited with code 2 ``` I think the above error comes from the following line in dockerfile and because the user `archivebox` doesn't have the right permissions ``` RUN archivebox version ``` #### Steps to reproduce 1. Build archive box image and run the container #### Software versions - OS: macOS 10.14 - ArchiveBox version: 1866da3
kerem closed this issue 2026-03-14 21:52:21 +03:00
Author
Owner

@walkero-gr commented on GitHub (Jul 7, 2020):

I fixed the above issue by adding --create-home at the useradd command, but I would like your opinion on that.

RUN groupadd --system archivebox \
    && useradd --create-home --system --gid archivebox --groups audio,video archivebox
<!-- gh-comment-id:654819947 --> @walkero-gr commented on GitHub (Jul 7, 2020): I fixed the above issue by adding `--create-home` at the `useradd` command, but I would like your opinion on that. ``` RUN groupadd --system archivebox \ && useradd --create-home --system --gid archivebox --groups audio,video archivebox ```
Author
Owner

@apkallum commented on GitHub (Jul 15, 2020):

@walkero-gr Thanks for the report! This PR should've fixed it: https://github.com/pirate/ArchiveBox/pull/361

<!-- gh-comment-id:658869728 --> @apkallum commented on GitHub (Jul 15, 2020): @walkero-gr Thanks for the report! This PR should've fixed it: https://github.com/pirate/ArchiveBox/pull/361
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ArchiveBox#3271
No description provided.