mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-09-12 19:50:57 +05:00
Keep setup config parent user-writable
This commit is contained in:
parent
cbc25320dd
commit
83ee111dcc
@ -26,8 +26,9 @@ def test_setup_script_never_recursively_chowns_collection_data():
|
||||
def test_setup_script_gives_archivebox_user_ownership_of_runtime_parent_dirs():
|
||||
script = SETUP_SCRIPT.read_text()
|
||||
|
||||
assert 'for path in "$HOME/.local" "$HOME/.local/share" "$HOME/.cache" "$HOME/.cache/archivebox"; do' in script
|
||||
assert 'for path in "$HOME/.local" "$HOME/.local/share" "$HOME/.cache" "$HOME/.cache/archivebox" "$HOME/.config"; do' in script
|
||||
assert 'chown "$ARCHIVEBOX_SYSTEM_UID:$ARCHIVEBOX_SYSTEM_GID" "$path"' in script
|
||||
assert '"$HOME/.config/uv"' in script
|
||||
|
||||
|
||||
def test_setup_script_bootstraps_locked_abxpkg_version():
|
||||
|
||||
@ -103,13 +103,13 @@ fix_root_install_ownership() {
|
||||
fi
|
||||
|
||||
# Keep shared runtime parents writable after ArchiveBox drops privileges.
|
||||
for path in "$HOME/.local" "$HOME/.local/share" "$HOME/.cache" "$HOME/.cache/archivebox"; do
|
||||
for path in "$HOME/.local" "$HOME/.local/share" "$HOME/.cache" "$HOME/.cache/archivebox" "$HOME/.config"; do
|
||||
if [ -e "$path" ]; then
|
||||
chown "$ARCHIVEBOX_SYSTEM_UID:$ARCHIVEBOX_SYSTEM_GID" "$path"
|
||||
fi
|
||||
done
|
||||
|
||||
for path in "$HOME/.local/bin" "$HOME/.local/share/uv" "$HOME/.cache/uv" "$ABXPKG_LIB_DIR"; do
|
||||
for path in "$HOME/.local/bin" "$HOME/.local/share/uv" "$HOME/.cache/uv" "$HOME/.config/uv" "$ABXPKG_LIB_DIR"; do
|
||||
if [ -e "$path" ]; then
|
||||
chown -R "$ARCHIVEBOX_SYSTEM_UID:$ARCHIVEBOX_SYSTEM_GID" "$path"
|
||||
fi
|
||||
|
||||
Loading…
Reference in New Issue
Block a user