mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-04-25 09:06:02 +03:00
[GH-ISSUE #1002] Question: :dev branch container gives permission denied errors on migration script (in /app) even after new install #626
Labels
No labels
expected: maybe someday
expected: next release
expected: release after next
expected: unlikely unless contributed
good first ticket
help wanted
pull-request
scope: all users
scope: windows users
size: easy
size: hard
size: medium
size: medium
status: backlog
status: blocked
status: done
status: idea-phase
status: needs followup
status: wip
status: wontfix
touches: API/CLI/Spec
touches: configuration
touches: data/schema/architecture
touches: dependencies/packaging
touches: docs
touches: js
touches: views/replayers/html/css
why: correctness
why: functionality
why: performance
why: security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ArchiveBox#626
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @agnosticlines on GitHub (Jul 24, 2022).
Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/1002
Hi there,
I've been using ArchiveBox for quite a while, previously I was using the :latest branch, which works fine for most things, except that SingleFile doesn't work because of the missing link to
/usr/bin/chromium-browserI see there's a fix in the dockerfile, so when I switch to the dev docker release the link is correct however I cannot start the server due to permission errors, this happens regardless of
PUID,PGIDhost permissions (777 for debugging) of the data folder, the issue appears to be for some reason the/app/folder has the wrong permissionsInitial logs
This happens even if I set up a brand new directory with the :dev branch to create a new database and do setup/init.
If I create the container and spawn a shell to poke around it appears
/apphas permissionsroot:rootwhich should be fine, but I guess ArchiveBox writes out the migration files to the/appdirectory, what's interesting is that this happens even on a totally fresh install.Here are the permissions:
Update:
May not be a permissions issue, the file doesn't seem to exist
Not too sure what causes this, I looked at the migrations subdir and they're all on git anyways, so I'm guessing it's trying to execute a migration that doesn't exist yet? Maybe @pirate pushed a new build expecting a migration there when there isn't one yet?
Update: Yeah it's a permissions issue, giving
archivebox:archiveboxownership of/app/archivebox/core/migrationsworks:@selim13 commented on GitHub (Sep 13, 2022):
A quick and dirty workaround to fix permissions on start:
@turian commented on GitHub (Sep 13, 2022):
@selim13 Can you make this a PR? I have the same issue
@turian commented on GitHub (Sep 14, 2022):
@agnosticlines @selim13 You can use my docker image
turian/archivebox:migrations-0021or wait for this PR to be merged: https://github.com/ArchiveBox/ArchiveBox/pull/1027 (based upon my branch https://github.com/turian/ArchiveBox/tree/feature/migrations-0021_auto_20220914_0934.py )@pirate commented on GitHub (Nov 28, 2022):
Yeah sorry a bug got merged into dev with one of the recent PRs a few months ago and I haven't had a chance to bisect and dig it out yet.
@pirate commented on GitHub (Nov 28, 2022):
This should be fixed now as I merged @turian's PR with the missing migration. Comment back if you're still having issues on the latest dev release.
@canoziia commented on GitHub (Nov 28, 2022):
Hi, I found that this problem seems to still exist:
@pirate commented on GitHub (Jun 13, 2023):
I believe this issue should be fixed again, comment back if you're still having trouble and I can re-open it.
@Astro1247 commented on GitHub (Aug 22, 2024):
Hi! Looks like trouble is back with migration 0069
@pirate commented on GitHub (Aug 22, 2024):
Ok yeah the issue is it's trying to create a new migration that it shouldn't be creating. Don't run the workarounds posted above (don't worry if you did it should be fine), it's an edge case for some setups that I need to fix in the code directly.
@Astro1247 commented on GitHub (Aug 22, 2024):
unfortunately currently my instance is stuck without being able to access my archive anymore, I was using 0.7.2 but at some moment it stopped grabbing titles for all links with just something like "title not found", or similar from logs and also it was really, really slow in most cases, so I tried to update it to latest dev 0.8.2 - now stuck with
django.db.utils.IntegrityError: NOT NULL constraint failed: core_snapshot.created_by_idTried to downgrade back - but stuck with some different other problems each time too.. Like latest was
django.db.utils.IntegrityError: NOT NULL constraint failed: core_snapshot.createdI should've create a full instance backup before trying to update.. :(
So for now I'm just hoping that this issue in first place after being resolve can resolve some other issues and I'll be able to use my archive again..
@pirate commented on GitHub (Aug 22, 2024):
@Astro1247, I understand it looks scary but don't worry you shouldn't lose data, Django migrations are deterministic and atomic (meaning if they fail during some step it wont leave your db in a corrupted state). In the future you should definitely back up before installing any BETA releases but I'll help fix it for now.
I just pushed fixes for the two underlying issues you encountered (missing migration 0069 and created_by_id failure):
github.com/ArchiveBox/ArchiveBox@afe1307617github.com/ArchiveBox/ArchiveBox@09553d83You should be able to pull the latest
:devand run it, and it will pick up wherever it left off, and re-run the migrations needed to bring you up to the current version.@pirate commented on GitHub (Aug 23, 2024):
Just bumping this to send a new notification because I edited my previous comment quite a bit ^
@Astro1247 commented on GitHub (Aug 29, 2024):
Thanks, it managed to recover (some?, it said it loaded 530 links and next row it said it ignored 530 invalid links) data and even it completely mixed all the data (date of saving is new now) at least I'm able to view this data and archivebox itself started.
All new starts are now with this warning:
Also no new archiving tasks can be completed, no matter how much different attempts with different settings I've done, all fails into:
So no new data can be saved, it all fails with same error, even that everything is okay, when using vnc everything seems fine too, but, its fails on archiving attempt :)
Also, all these actions that I've taken, all this updates etc were to fix failing title extracting, and.. it still fails to extract any page title XD Even with everything latest
@pirate commented on GitHub (Jan 8, 2026):
latest
devhas a totally new plugin architecture, should fix issues like this. let me know if you get a chance to try it. make sure to back up any existing archive as it's not stable yet!should_save_extractormethods to acceptoverwriteparameter #1253should_save_extractormethods to acceptoverwriteparameter #2762should_save_extractormethods to acceptoverwriteparameter #4265