[PR #1312] [MERGED] Fallback to not chown'ing ./data/archive dir if it's a network mount that prevents ownership changes #4390

Closed
opened 2026-03-15 01:42:01 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ArchiveBox/ArchiveBox/pull/1312
Author: @gnattu
Created: 1/5/2024
Status: Merged
Merged: 1/6/2024
Merged by: @pirate

Base: devHead: main


📝 Commits (2)

  • bc2bfc1 fix: handle archive folder permission more graceful
  • e085b1d try to chown everything in ./data and only fallback to avoiding ./data/archive if it fails initially

📊 Changes

1 file changed (+12 additions, -5 deletions)

View changed files

📝 bin/docker_entrypoint.sh (+12 -5)

📄 Description

Summary

On mounted network shares, chmod might be hard or impossible to do without modify the server config. However, we can ignore the archive folder because we already tested if that folder is writeable and printed warnings to the user when we failed.

This PR ignores the archive folder and its contents when doing the chmod step, which is useful for mounted NFS/CIFS shares on archive folder specifically but the rest of the data folder remains a local directory. When modifying the config of the server is not an option, this can still enable users to use archivebox with network shares to store the most storage consuming part of the web archives.

This PR also modifies the warning message to be more accurately reflect the permission error is happening on the archive folder specifically, not the whole data folder.

I also noticed that there are "create archive folder if not exist" comment, but the shell script actually create the logs folder. I don't know if it is the intended behavior so I leave it as-is.

Related issues

This is a followup of #1304, providing an alternative method when modifying server config is not an option.

Changes these areas

  • Bugfixes
  • Feature behavior
  • Command line interface
  • Configuration options
  • Internal architecture
  • Snapshot data layout on disk

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ArchiveBox/ArchiveBox/pull/1312 **Author:** [@gnattu](https://github.com/gnattu) **Created:** 1/5/2024 **Status:** ✅ Merged **Merged:** 1/6/2024 **Merged by:** [@pirate](https://github.com/pirate) **Base:** `dev` ← **Head:** `main` --- ### 📝 Commits (2) - [`bc2bfc1`](https://github.com/ArchiveBox/ArchiveBox/commit/bc2bfc1cc7e2086ac5f09d348bbebefc422d328f) fix: handle archive folder permission more graceful - [`e085b1d`](https://github.com/ArchiveBox/ArchiveBox/commit/e085b1d13be87d7dc979181c580afeba59110d73) try to chown everything in ./data and only fallback to avoiding ./data/archive if it fails initially ### 📊 Changes **1 file changed** (+12 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `bin/docker_entrypoint.sh` (+12 -5) </details> ### 📄 Description <!-- IMPORTANT: Do not submit PRs with only formatting / PEP8 / line length changes. --> # Summary <!--e.g. This PR fixes ABC or adds the ability to do XYZ...--> On mounted network shares, `chmod` might be hard or impossible to do without modify the server config. However, we can ignore the archive folder because we already tested if that folder is writeable and printed warnings to the user when we failed. This PR ignores the archive folder and its contents when doing the chmod step, which is useful for mounted NFS/CIFS shares on archive folder specifically but the rest of the data folder remains a local directory. When modifying the config of the server is not an option, this can still enable users to use archivebox with network shares to store the most storage consuming part of the web archives. This PR also modifies the warning message to be more accurately reflect the permission error is happening on the archive folder specifically, not the whole data folder. I also noticed that there are "create archive folder if not exist" comment, but the shell script actually create the logs folder. I don't know if it is the intended behavior so I leave it as-is. # Related issues <!-- e.g. #123 or Roadmap goal # https://github.com/pirate/ArchiveBox/wiki/Roadmap --> This is a followup of #1304, providing an alternative method when modifying server config is not an option. # Changes these areas - [x] Bugfixes - [ ] Feature behavior - [ ] Command line interface - [ ] Configuration options - [ ] Internal architecture - [ ] Snapshot data layout on disk --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-15 01:42:01 +03:00
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#4390
No description provided.