[GH-ISSUE #1277] support: mounting docker data directory #3806

Closed
opened 2026-03-15 00:30:52 +03:00 by kerem · 11 comments
Owner

Originally created by @shazgames1 on GitHub (Nov 27, 2023).
Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/1277

Describe the bug

Running ArchiveBox init inside Docker completely breaks Linux permissions. I can't even open new terminal session because of Permission denied

Steps to reproduce

  1. docker run -v $PWD:/data -it archivebox/archivebox init --setup

Screenshots or log output

Status: Downloaded newer image for archivebox/archivebox:latest
chown: cannot access '/browsers/*': No such file or directory
[i] [2023-11-27 16:27:40] ArchiveBox v0.7.1+editable: archivebox init --setup
> /data

[X] This folder appears to already have files in it, but no index.sqlite3 present.

You must run init in a completely empty directory, or an existing data folder.

Hint: To import an existing data folder make sure to cd into the folder first,
then run and run 'archivebox init' to pick up where you left off.

(Always make sure your data folder is backed up first before updating ArchiveBox)

ArchiveBox version

Latest from DockerHub

Originally created by @shazgames1 on GitHub (Nov 27, 2023). Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/1277 #### Describe the bug Running ArchiveBox init inside Docker completely breaks Linux permissions. I can't even open new terminal session because of Permission denied #### Steps to reproduce 1. docker run -v $PWD:/data -it archivebox/archivebox init --setup #### Screenshots or log output Status: Downloaded newer image for archivebox/archivebox:latest chown: cannot access '/browsers/*': No such file or directory [i] [2023-11-27 16:27:40] ArchiveBox v0.7.1+editable: archivebox init --setup > /data [X] This folder appears to already have files in it, but no index.sqlite3 present. You must run init in a completely empty directory, or an existing data folder. Hint: To import an existing data folder make sure to cd into the folder first, then run and run 'archivebox init' to pick up where you left off. (Always make sure your data folder is backed up first before updating ArchiveBox) #### ArchiveBox version Latest from DockerHub
kerem closed this issue 2026-03-15 00:30:57 +03:00
Author
Owner

@pirate commented on GitHub (Nov 27, 2023):

What folder are you running it inside of? Is it a network mount or other special folder of some kind?

<!-- gh-comment-id:1828328477 --> @pirate commented on GitHub (Nov 27, 2023): What folder are you running it inside of? Is it a network mount or other special folder of some kind?
Author
Owner

@shazgames1 commented on GitHub (Nov 27, 2023):

I run in user's home directory (/home/$USER)

<!-- gh-comment-id:1828358764 --> @shazgames1 commented on GitHub (Nov 27, 2023): I run in user's home directory (/home/$USER)
Author
Owner

@shazgames1 commented on GitHub (Nov 27, 2023):

I installed docker on clean ubuntu using official docker instruction with Linux post-installation steps

<!-- gh-comment-id:1828375282 --> @shazgames1 commented on GitHub (Nov 27, 2023): I installed docker on clean ubuntu using [official docker instruction](https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository) with [Linux post-installation steps](https://docs.docker.com/engine/install/linux-postinstall/)
Author
Owner

@pirate commented on GitHub (Nov 27, 2023):

Ah that's why, you need to create a new empty folder for it and run inside that folder. Don't run it inside your home folder or any other folder that already contains files.

<!-- gh-comment-id:1828529392 --> @pirate commented on GitHub (Nov 27, 2023): Ah that's why, you need to create a new empty folder for it and run inside that folder. Don't run it inside your home folder or any other folder that already contains files.
Author
Owner

@shazgames1 commented on GitHub (Nov 28, 2023):

It would be useful to add this clarification to the documentation in a block using Docker to avoid problems

<!-- gh-comment-id:1829264600 --> @shazgames1 commented on GitHub (Nov 28, 2023): It would be useful to add this clarification to the [documentation in a block using Docker](https://docs.archivebox.io/en/latest/Docker.html) to avoid problems
Author
Owner

@shazgames1 commented on GitHub (Nov 28, 2023):

I'm still wondering how the container was able to access the host's system directories

<!-- gh-comment-id:1829317764 --> @shazgames1 commented on GitHub (Nov 28, 2023): I'm still wondering how the container was able to access the host's system directories
Author
Owner

@pirate commented on GitHub (Nov 28, 2023):

-v $PWD:/data mounts $PWD (the current folder you're in) into /data inside the container. If you run it inside your home folder it will attempt to use your home folder as the data dir, which errors out because that's not allowed.

The README and docs are pretty clear about the requirements of the data folder image

<!-- gh-comment-id:1830527440 --> @pirate commented on GitHub (Nov 28, 2023): `-v $PWD:/data` mounts `$PWD` (the current folder you're in) into `/data` inside the container. If you run it inside your home folder it will attempt to use your home folder as the data dir, which errors out because that's not allowed. The README and docs are pretty clear about the requirements of the data folder ![image](https://github.com/ArchiveBox/ArchiveBox/assets/511499/caa61e03-161b-4cec-b749-5b1eee3d87b2)
Author
Owner

@shazgames1 commented on GitHub (Nov 29, 2023):

I mean Usage instruction instruction in the Overview. There is no information about necessity of running command in new empty directory. Why not add a mkdir archivebox && cd archivebox instruction to the section as is done in Docker Compose Setup section ?
Screenshot 2023-11-29 at 13 58 39

<!-- gh-comment-id:1831325132 --> @shazgames1 commented on GitHub (Nov 29, 2023): I mean Usage instruction instruction in the [Overview](https://docs.archivebox.io/en/latest/Docker.html#overview). There is no information about necessity of running command in new empty directory. Why not add a `mkdir archivebox && cd archivebox` instruction to the section as is done in [Docker Compose Setup section](https://docs.archivebox.io/en/latest/Docker.html#setup) ? <img width="803" alt="Screenshot 2023-11-29 at 13 58 39" src="https://github.com/ArchiveBox/ArchiveBox/assets/33340446/38895983-869d-406d-93f9-7c56c4c8cc2a">
Author
Owner

@ZeroPing01 commented on GitHub (Dec 14, 2023):

Hi,

I'm using the last image version and I still have the same issue as you @shazgames1

The error is :
chown: cannot access '/browsers/*': No such file or directory

The volume used for my case is : /SSD1/archivebox/data:/data
I changed the permission on this folder (host side): chmod 777 -R /SSD1/archivebox/data but nothing change.

This folder data is empty.

The problem seems being in the container directly in this path : /browsers
/browsers is not binded on my host.

I don't understand why changing permission (chmod 777) for /data from my host, can affect /browsers folder in the container.

I followed steps from this page : https://archivebox.io/
I found nothing about this /browsers folder.

It is not clear for me.
Thanks for your help.

<!-- gh-comment-id:1856328087 --> @ZeroPing01 commented on GitHub (Dec 14, 2023): Hi, I'm using the last image version and I still have the same issue as you @shazgames1 The error is : `chown: cannot access '/browsers/*': No such file or directory` The volume used for my case is : `/SSD1/archivebox/data:/data` I changed the permission on this folder (host side): `chmod 777 -R /SSD1/archivebox/data` but nothing change. This folder data is empty. The problem seems being in the container directly in this path : `/browsers` `/browsers` is not binded on my host. I don't understand why changing permission (chmod 777) for `/data` from my host, can affect `/browsers` folder in the container. I followed steps from this page : https://archivebox.io/ I found nothing about this `/browsers` folder. It is not clear for me. Thanks for your help.
Author
Owner

@pirate commented on GitHub (Dec 15, 2023):

The browsers folder should not require binding and has no relation to the /data folder, it's entirely internal to the container and is not meant to be exposed to users at all.

Do you mind opening a new issue @hafx and posting the full output of archivebox version?

<!-- gh-comment-id:1857296754 --> @pirate commented on GitHub (Dec 15, 2023): The browsers folder should not require binding and has no relation to the /data folder, it's entirely internal to the container and is not meant to be exposed to users at all. Do you mind opening a new issue @hafx and posting the full output of `archivebox version`?
Author
Owner

@ZeroPing01 commented on GitHub (Dec 18, 2023):

Do you mind opening a new issue @hafx and posting the full output of archivebox version?

@Gobbless beat me to it.

<!-- gh-comment-id:1859383681 --> @ZeroPing01 commented on GitHub (Dec 18, 2023): > Do you mind opening a new issue @hafx and posting the full output of `archivebox version`? @Gobbless beat me to it.
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#3806
No description provided.