[GH-ISSUE #377] Bugfix: OUTPUT_PERMISSIONS environment variable appears to not be fully working. #1771

Closed
opened 2026-03-01 17:53:31 +03:00 by kerem · 6 comments
Owner

Originally created by @1n5aN1aC on GitHub (Jul 22, 2020).
Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/377

Describe the bug

I am Testing v0.4.3, to resolve https://github.com/pirate/ArchiveBox/issues/376 and noticed that defining OUTPUT_PERMISSIONS does not seem to be applying to all output files.
I do not know if this is a regression in v0.4.3, or if it exists before, or if I am doing something wrong.

Steps to reproduce

I built the container using the following commands:

git checkout django
git pull
docker build . -t archivebox:0.4.3
docker run -v "/mnt/data/Archive/ArchiveBox":/data --shm-size 512M --env SUBMIT_ARCHIVE_DOT_ORG=False --env WGET_USER_AGENT="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/73.0.3683.75 Safari/537.36" --env OUTPUT_PERMISSIONS=755 archivebox:0.4.3 init
docker run -v "/mnt/data/Archive/ArchiveBox":/data --shm-size 512M --env SUBMIT_ARCHIVE_DOT_ORG=False --env WGET_USER_AGENT="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/73.0.3683.75 Safari/537.36" --env OUTPUT_PERMISSIONS=755 archivebox:0.4.3 add "https://example.com"

Screenshots or log output

However, the main files that are generated do not have 755 permissions set.
The files inside the sub-dir example.com do appear to have the permission set.

Originally created by @1n5aN1aC on GitHub (Jul 22, 2020). Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/377 ## Describe the bug I am Testing v0.4.3, to resolve https://github.com/pirate/ArchiveBox/issues/376 and noticed that defining OUTPUT_PERMISSIONS does not seem to be applying to all output files. I do not know if this is a regression in v0.4.3, or if it exists before, or if I am doing something wrong. #### Steps to reproduce I built the container using the following commands: ``` git checkout django git pull docker build . -t archivebox:0.4.3 docker run -v "/mnt/data/Archive/ArchiveBox":/data --shm-size 512M --env SUBMIT_ARCHIVE_DOT_ORG=False --env WGET_USER_AGENT="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/73.0.3683.75 Safari/537.36" --env OUTPUT_PERMISSIONS=755 archivebox:0.4.3 init docker run -v "/mnt/data/Archive/ArchiveBox":/data --shm-size 512M --env SUBMIT_ARCHIVE_DOT_ORG=False --env WGET_USER_AGENT="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/73.0.3683.75 Safari/537.36" --env OUTPUT_PERMISSIONS=755 archivebox:0.4.3 add "https://example.com" ``` #### Screenshots or log output However, the main files that are generated do not have 755 permissions set. The files inside the sub-dir example.com **do** appear to have the permission set. ![](https://i.imgur.com/8MeQC31.png)
kerem 2026-03-01 17:53:31 +03:00
Author
Owner

@1n5aN1aC commented on GitHub (Jul 22, 2020):

This does appear to also still be the case in the django branch as well.

Interestingly, I noticed that upon running init on a new directory, it appears to create the files with the proper (or at least more) permissions before later changing them to the more restrictive 0600 permissions it leaves them with.

<!-- gh-comment-id:662544513 --> @1n5aN1aC commented on GitHub (Jul 22, 2020): This does appear to also still be the case in the django branch as well. Interestingly, I noticed that upon running `init` on a new directory, it appears to create the files with the proper (or at least more) permissions before later changing them to the more restrictive 0600 permissions it leaves them with.
Author
Owner

@cdvv7788 commented on GitHub (Jul 24, 2020):

@1n5aN1aC please test in the django branch again.

<!-- gh-comment-id:663539442 --> @cdvv7788 commented on GitHub (Jul 24, 2020): @1n5aN1aC please test in the django branch again.
Author
Owner

@1n5aN1aC commented on GitHub (Jul 24, 2020):

Progress!

It appears all of the files are now applied the chosen permissions except for output.pdf and screenshot.jpg

<!-- gh-comment-id:663632819 --> @1n5aN1aC commented on GitHub (Jul 24, 2020): Progress! It appears all of the files are now applied the chosen permissions except for output.pdf and screenshot.jpg ![](https://i.imgur.com/Nu7Ek8H.png)
Author
Owner

@pirate commented on GitHub (Jul 24, 2020):

Ok I think that's fixed as well in #391 now. If you give it a go now they should all have the same permissions.

<!-- gh-comment-id:663676102 --> @pirate commented on GitHub (Jul 24, 2020): Ok I think that's fixed as well in #391 now. If you give it a go now they should all have the same permissions.
Author
Owner

@1n5aN1aC commented on GitHub (Jul 24, 2020):

It does indeed appear to be fixed, thank you very much!
It looks like it even corrected the permissions on the core index files.

As a bit of an aside, would you be willing to add the "django" branch to docker hub's build system, to make continued testing easier? No big deal if not, I can keep doing it myself if you'd rather not add it.

<!-- gh-comment-id:663717161 --> @1n5aN1aC commented on GitHub (Jul 24, 2020): It does indeed appear to be fixed, thank you very much! It looks like it even corrected the permissions on the core index files. As a bit of an aside, would you be willing to add the "django" branch to docker hub's build system, to make continued testing easier? No big deal if not, I can keep doing it myself if you'd rather not add it.
Author
Owner

@cdvv7788 commented on GitHub (Jul 24, 2020):

There are some tests related to docker in github action, and the django branch will be merged to master soon too.

<!-- gh-comment-id:663723271 --> @cdvv7788 commented on GitHub (Jul 24, 2020): There are some tests related to docker in github action, and the django branch will be merged to master soon too.
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#1771
No description provided.