question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug: `archivebox init --setup` through `docker-compose` throws "Permission denied" errors on `/data` folder

See original GitHub issue

Describe the bug

Running most archivebox commands fail with “Permission denied” errors on the /data folder. I have followed the instructions exactly as they are in the README on macOS Monterey 12.2.1.

Steps to reproduce

mkdir ${ARCHIVEBOX_FOLDER}
cd ${ARCHIVEBOX_FOLDER}
mkdir ~/archivebox && cd ~/archivebox
curl -O 'https://raw.githubusercontent.com/ArchiveBox/ArchiveBox/master/docker-compose.yml'
docker-compose run archivebox init --setup

Screenshots or log output

Screenshot 2022-03-18 at 10 56 48@2x

ArchiveBox version

ArchiveBox v0.6.2
Cpython Linux Linux-5.10.88-0-virt-x86_64-with-glibc2.28 x86_64
IN_DOCKER=True 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.9.5          valid     /usr/local/bin/python3.9
 √  DJANGO_BINARY         v3.1.10         valid     /usr/local/lib/python3.9/site-packages/django/bin/django-admin.py
 √  CURL_BINARY           v7.64.0         valid     /usr/bin/curl
 √  WGET_BINARY           v1.20.1         valid     /usr/bin/wget
 √  NODE_BINARY           v15.14.0        valid     /usr/bin/node
 √  SINGLEFILE_BINARY     v0.3.16         valid     /node/node_modules/single-file/cli/single-file
 √  READABILITY_BINARY    v0.0.2          valid     /node/node_modules/readability-extractor/readability-extractor
 √  MERCURY_BINARY        v1.0.0          valid     /node/node_modules/@postlight/mercury-parser/cli.js
 √  GIT_BINARY            v2.20.1         valid     /usr/bin/git
 √  YOUTUBEDL_BINARY      v2021.04.26     valid     /usr/local/bin/youtube-dl
 √  CHROME_BINARY         v90.0.4430.93   valid     /usr/bin/chromium
 √  RIPGREP_BINARY        v0.10.0         valid     /usr/bin/rg

[i] Source-code locations:
 √  PACKAGE_DIR           22 files        valid     /app/archivebox
 √  TEMPLATES_DIR         3 files         valid     /app/archivebox/templates
 -  CUSTOM_TEMPLATES_DIR  -               disabled

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

[i] Data locations:
 √  OUTPUT_DIR            37 files        valid     /data
 √  SOURCES_DIR           0 files         valid     ./sources
 √  LOGS_DIR              1 files         valid     ./logs
 √  ARCHIVE_DIR           0 files         valid     ./archive
 √  CONFIG_FILE           81.0 Bytes      valid     ./ArchiveBox.conf
 √  SQL_INDEX             204.0 KB        valid     ./index.sqlite3

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
akhilleusuggocommented, Mar 19, 2022

Exactly, is docker creating it with the wrong permissions.

There are many ways on forums and topics to fix this issue. Problems coming from different OS or Linux flavors. I’m not an expert, can’t give you a clear explanation.

But if your goal is to fix this, ( I don’t believe it’s a bug, since I’m not facing this issue, I tried to reproduce but work fine for me, except on my RPI4), you should change ownership of the folder /data to your user, and on the variable environment use the linuxserver.io convention (PUID and PGID). Something like this;

................
ports:
            - 8000:8000
        environment:
            - PUID=1000
            - PGID=1000
            - ALLOWED_HOSTS=*
..................

https://github.com/ArchiveBox/ArchiveBox/pull/635

1reaction
akhilleusuggocommented, Mar 18, 2022

It’s not a bug, but a volumes permission issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix Permission denied: '/data' · Issue #539 - GitHub
I'm following the setup instructions using docker-compose. When I run docker-compose run archivebox init I get [i] [2020-11-16 13:38:31] ...
Read more >
Permission denied while trying to access files in container ...
When using the docker-compose method to run Rasa, several folders will be mounted into the containers.
Read more >
Local quickstart failing due to permissions error - Overhang.IO
I'm trying to start tutor local quickstart, in non-root mode, as I downloaded the binary and installed applying the recommended permission ...
Read more >
[Support] A75G Repo - Page 19 - Docker Containers - Unraid
The error is that the container runs as the incorrect user and group, so the container doesn't have read/write permissions for the appdata ......
Read more >
cannot start docker compose application. reason: exit status 14
I started getting Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found