[GH-ISSUE #760] Bug: Can't init archivebox on FreeBSD iocage jail #478

Closed
opened 2026-03-01 14:44:00 +03:00 by kerem · 6 comments
Owner

Originally created by @kennedyoliveira on GitHub (Jun 4, 2021).
Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/760

Describe the bug

Trying to install archivebox in a FreeBSD jail (iocage) but when I try to run the init command as a non-root user, it fails saying it can't be run as root

Steps to reproduce

  1. create a jail
  2. create any user, ex: archivebox
  3. run the installation script

Screenshots or log output

python3 -m archivebox init --setup
[i] [2021-06-04 22:23:49] ArchiveBox v0.6.2: archivebox init --setup
    > /usr/home/archivebox/archivebox

[!] ArchiveBox should never be run as root!
    For more information, see the security overview documentation:
        https://github.com/ArchiveBox/ArchiveBox/wiki/Security-Overview#do-not-run-as-root
$ id
uid=1001(archivebox) gid=1001(archivebox) groups=1001(archivebox)

ArchiveBox version


$ archivebox version
ArchiveBox v0.6.2
Cpython FreeBSD FreeBSD-12.2-RELEASE-p6-amd64-64bit-ELF amd64
IN_DOCKER=False DEBUG=False IS_TTY=True TZ=UTC SEARCH_BACKEND_ENGINE=ripgrep

[i] Dependency versions:
 √  ARCHIVEBOX_BINARY     v0.6.2          valid     /usr/local/bin/archivebox
 √  PYTHON_BINARY         v3.7.10         valid     /usr/local/bin/python3.7
 √  DJANGO_BINARY         v3.1.12         valid     /usr/local/lib/python3.7/site-packages/django/bin/django-admin.py
 √  CURL_BINARY           v7.76.0         valid     /usr/local/bin/curl
 √  WGET_BINARY           v1.21           valid     /usr/local/bin/wget
 √  NODE_BINARY           v15.14.0        valid     /usr/local/bin/node
 X  SINGLEFILE_BINARY     ?               invalid   single-file
 X  READABILITY_BINARY    ?               invalid   readability-extractor
 X  MERCURY_BINARY        ?               invalid   mercury-parser
 √  GIT_BINARY            v2.31.1         valid     /usr/local/bin/git
 √  YOUTUBEDL_BINARY      v2021.05.16     valid     /usr/local/bin/youtube-dl
 √  CHROME_BINARY         v90.0.4430.212  valid     /usr/local/bin/chrome
 √  RIPGREP_BINARY        v12.1.1         valid     /usr/local/bin/rg

[i] Source-code locations:
 √  PACKAGE_DIR           23 files        valid     /usr/local/lib/python3.7/site-packages/archivebox
 √  TEMPLATES_DIR         3 files         valid     /usr/local/lib/python3.7/site-packages/archivebox/templates
 -  CUSTOM_TEMPLATES_DIR  -               disabled

[i] Secrets locations:
 -  CHROME_USER_DATA_DIR  -               disabled
 -  COOKIES_FILE          -               disabled


[i] Data locations:

[!] Warning: Missing 3 recommended dependencies
    ! SINGLEFILE_BINARY: single-file (unable to detect version)
      Hint: To install all packages automatically run: archivebox setup
            or to disable it and silence this warning: archivebox config --set SAVE_SINGLEFILE=False

    ! READABILITY_BINARY: readability-extractor (unable to detect version)
      Hint: To install all packages automatically run: archivebox setup
            or to disable it and silence this warning: archivebox config --set SAVE_READABILITY=False

    ! MERCURY_BINARY: mercury-parser (unable to detect version)
      Hint: To install all packages automatically run: archivebox setup
            or to disable it and silence this warning: archivebox config --set SAVE_MERCURY=False
Originally created by @kennedyoliveira on GitHub (Jun 4, 2021). Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/760 #### Describe the bug Trying to install archivebox in a FreeBSD jail (iocage) but when I try to run the init command as a non-root user, it fails saying it can't be run as root #### Steps to reproduce 1. create a jail 2. create any user, ex: archivebox 3. run the installation script #### Screenshots or log output ```logs python3 -m archivebox init --setup [i] [2021-06-04 22:23:49] ArchiveBox v0.6.2: archivebox init --setup > /usr/home/archivebox/archivebox [!] ArchiveBox should never be run as root! For more information, see the security overview documentation: https://github.com/ArchiveBox/ArchiveBox/wiki/Security-Overview#do-not-run-as-root $ id uid=1001(archivebox) gid=1001(archivebox) groups=1001(archivebox) ``` #### ArchiveBox version ```logs $ archivebox version ArchiveBox v0.6.2 Cpython FreeBSD FreeBSD-12.2-RELEASE-p6-amd64-64bit-ELF amd64 IN_DOCKER=False DEBUG=False IS_TTY=True TZ=UTC SEARCH_BACKEND_ENGINE=ripgrep [i] Dependency versions: √ ARCHIVEBOX_BINARY v0.6.2 valid /usr/local/bin/archivebox √ PYTHON_BINARY v3.7.10 valid /usr/local/bin/python3.7 √ DJANGO_BINARY v3.1.12 valid /usr/local/lib/python3.7/site-packages/django/bin/django-admin.py √ CURL_BINARY v7.76.0 valid /usr/local/bin/curl √ WGET_BINARY v1.21 valid /usr/local/bin/wget √ NODE_BINARY v15.14.0 valid /usr/local/bin/node X SINGLEFILE_BINARY ? invalid single-file X READABILITY_BINARY ? invalid readability-extractor X MERCURY_BINARY ? invalid mercury-parser √ GIT_BINARY v2.31.1 valid /usr/local/bin/git √ YOUTUBEDL_BINARY v2021.05.16 valid /usr/local/bin/youtube-dl √ CHROME_BINARY v90.0.4430.212 valid /usr/local/bin/chrome √ RIPGREP_BINARY v12.1.1 valid /usr/local/bin/rg [i] Source-code locations: √ PACKAGE_DIR 23 files valid /usr/local/lib/python3.7/site-packages/archivebox √ TEMPLATES_DIR 3 files valid /usr/local/lib/python3.7/site-packages/archivebox/templates - CUSTOM_TEMPLATES_DIR - disabled [i] Secrets locations: - CHROME_USER_DATA_DIR - disabled - COOKIES_FILE - disabled [i] Data locations: [!] Warning: Missing 3 recommended dependencies ! SINGLEFILE_BINARY: single-file (unable to detect version) Hint: To install all packages automatically run: archivebox setup or to disable it and silence this warning: archivebox config --set SAVE_SINGLEFILE=False ! READABILITY_BINARY: readability-extractor (unable to detect version) Hint: To install all packages automatically run: archivebox setup or to disable it and silence this warning: archivebox config --set SAVE_READABILITY=False ! MERCURY_BINARY: mercury-parser (unable to detect version) Hint: To install all packages automatically run: archivebox setup or to disable it and silence this warning: archivebox config --set SAVE_MERCURY=False ```
Author
Owner

@dansbandit commented on GitHub (Jun 5, 2021):

I had the same problem. I don't remember where I got the fix but this how it got solved. Archivebox needs to have login shell.

$ passwd archivebox # set password for archivebox
$ login # login as archivebox
$ cd /mnt/archive
$  archivebox init --setup
<!-- gh-comment-id:855178053 --> @dansbandit commented on GitHub (Jun 5, 2021): I had the same problem. I don't remember where I got the fix but this how it got solved. Archivebox needs to have login shell. ``` $ passwd archivebox # set password for archivebox $ login # login as archivebox $ cd /mnt/archive $ archivebox init --setup ```
Author
Owner

@pirate commented on GitHub (Jun 5, 2021):

This is fixed on dev @kennedyoliveira but wont land until the next release https://github.com/ArchiveBox/ArchiveBox/pull/721#issue-622542023

The login shell trick works, but you shouldn't even need to do that in the next version.

In the meantime you can do the login shell thing, or install the pre-release version from dev

pip3 uninstall archivebox
pip3 install 'git+https://github.com/pirate/ArchiveBox@dev'

(You can update it to the official version after it gets released by just running that again ^)

<!-- gh-comment-id:855217075 --> @pirate commented on GitHub (Jun 5, 2021): This is fixed on `dev` @kennedyoliveira but wont land until the next release https://github.com/ArchiveBox/ArchiveBox/pull/721#issue-622542023 The login shell trick works, but you shouldn't even need to do that in the next version. In the meantime you can do the login shell thing, or install the pre-release version from dev ```bash pip3 uninstall archivebox pip3 install 'git+https://github.com/pirate/ArchiveBox@dev' ``` (You can update it to the official version after it gets released by just running that again ^)
Author
Owner

@kennedyoliveira commented on GitHub (Jun 12, 2021):

Hey @pirate thanks for the information, I'll keep an eye on the release, I also need to env user and password, planning on creating a plugin for TrueNAS so everyone can get it running very easily there, thanks!

<!-- gh-comment-id:860121544 --> @kennedyoliveira commented on GitHub (Jun 12, 2021): Hey @pirate thanks for the information, I'll keep an eye on the release, I also need to env user and password, planning on creating a plugin for TrueNAS so everyone can get it running very easily there, thanks!
Author
Owner

@sysfu commented on GitHub (Apr 11, 2023):

Hey @pirate thanks for the information, I'll keep an eye on the release, I also need to env user and password, planning on creating a plugin for TrueNAS so everyone can get it running very easily there, thanks!

Any progress on the TrueNAS plugin? That would be fantastic.

Don't see it here yet https://www.truenas.com/apps/

<!-- gh-comment-id:1503986813 --> @sysfu commented on GitHub (Apr 11, 2023): > Hey @pirate thanks for the information, I'll keep an eye on the release, I also need to env user and password, planning on creating a plugin for TrueNAS so everyone can get it running very easily there, thanks! Any progress on the TrueNAS plugin? That would be fantastic. Don't see it here yet https://www.truenas.com/apps/
Author
Owner

@pirate commented on GitHub (Jun 13, 2023):

I'm going to officially punt the responsibility of shipping a full TrueNAS plugin to the community. I simply don't have the capacity to maintain 3rd party plugins for ArchiveBox deployment myself anymore, as the bugfixing and support workload of ArchiveBox core has grown to eat up all my side-project time available already.

That being said, I love TrueNAS and use it myself to run Plex and Time Machine backups for everyone in our house! I would love to see ArchiveBox in TrueNAS someday, but I don't have the bandwidth to do it myself. Please comment back here if a TrueNAS/FreeNAS plugin is released in the future and I don't notice :)

<!-- gh-comment-id:1589142733 --> @pirate commented on GitHub (Jun 13, 2023): I'm going to officially punt the responsibility of shipping a full TrueNAS plugin to the community. I simply don't have the capacity to maintain 3rd party plugins for ArchiveBox deployment myself anymore, as the bugfixing and support workload of ArchiveBox core has grown to eat up all my side-project time available already. That being said, I love TrueNAS and use it myself to run Plex and Time Machine backups for everyone in our house! I would love to see ArchiveBox in TrueNAS someday, but I don't have the bandwidth to do it myself. Please comment back here if a TrueNAS/FreeNAS plugin is released in the future and I don't notice :)
Author
Owner

@pirate commented on GitHub (Mar 5, 2024):

I ended up doing this myself because I started using my own TrueNAS box at home more:

Also there's another useful article about doing it manually here:

https://dev.to/finloop/setting-up-archivebox-on-truenas-scale-1788

<!-- gh-comment-id:1979576879 --> @pirate commented on GitHub (Mar 5, 2024): I ended up doing this myself because I started using my own TrueNAS box at home more: - https://github.com/truecharts/charts/pull/18258 - https://github.com/truecharts/charts/pull/18488 - https://truecharts.org/charts/incubator/archivebox/ (help testing is welcome) Also there's another useful article about doing it manually here: https://dev.to/finloop/setting-up-archivebox-on-truenas-scale-1788
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#478
No description provided.