LibrePortal/scripts/source/files/arrays/files_function.sh
librelad 8e0d662a16 refactor(perms): one source of truth for container ownership
The install/start paths and the switch reconcile managed /docker ownership
separately, so a fresh install produced different ownership than a post-switch
state — the root cause of the rootless 'touch: Permission denied' storm.

Consolidate onto the reconcile model:
- dockerContainerOwner(): single definition of the mode's container owner
  (rooted -> manager, rootless -> config-authoritative docker install user).
- reconcileContainersTopOwnership(): owns + makes traversable the structural
  containers/ top dir; now also run by the switch reconcile (previously only
  the install pass set it, so a rootless->rooted switch left it stale).
- reconcileWebuiDirOwnership(): now uses dockerContainerOwner.
- reconcileDockerOwnership(): calls both helpers.
- fixFolderPermissions(): slimmed to the +x traversal bits; its ad-hoc
  containers/ chown is now the shared helper.
- fixPermissionsBeforeStart(): drop changeRootOwnedFilesAndFolders (a
  pre-de-sudo band-aid that only fixed root-owned files and ran contrary to
  the don't-touch-third-party-data rule); reconcile the WebUI dir via the
  shared helper instead. Delete the now-unused root_files_folders.sh and
  regenerate the source arrays.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: librelad <librelad@digitalangels.vip>
2026-05-24 13:46:12 +01:00

38 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
# This file is auto-generated by generate_arrays.sh
# Do not edit manually - run './scripts/source/files/generate_arrays.sh run' to regenerate
function_scripts=(
"function/checks/check_first_install.sh"
"function/checks/check_success.sh"
"function/checks/detect_os.sh"
"function/checks/user_exists.sh"
"function/file/container/backup_files.sh"
"function/file/container/restore_files.sh"
"function/file/copy_file.sh"
"function/file/copy_files.sh"
"function/file/copy_resource.sh"
"function/file/create_touch.sh"
"function/file/empty_line/check_empty.sh"
"function/file/empty_line/remove_line.sh"
"function/file/move_file.sh"
"function/file/zip_file.sh"
"function/folder/copy_folder.sh"
"function/folder/copy_folders.sh"
"function/folder/create_folder.sh"
"function/permission/app_folder.sh"
"function/permission/before_start.sh"
"function/permission/config.sh"
"function/permission/libreportal_folders.sh"
"function/permission/ownership/file.sh"
"function/permission/ownership/folder_group.sh"
"function/permission/ownership/root_file.sh"
"function/run/create_successful_run_file.sh"
"function/run/reinstall_libreportal.sh"
"function/validation/element.sh"
"function/validation/email.sh"
"function/validation/password.sh"
)