Skip to content
  • Timo Teräs's avatar
    db: rework directory permission handling · 09e48d8f
    Timo Teräs authored
    Apk used to reset directory permissions always, but this is undesirable
    if user has modified the permissions - especially during tmpfs boot.
    Though, it is desirable to update the permissions when packaging has
    changed permissions, or a new package is installed and the merged
    permission mask / owner changes.
    
    Thus the new code updates the permissions only if:
     1) We are booting and directory is not in apkovl
     2) The directory is modified by a package install/remove/upgrade
     3) The filesystem directory permission matched database
    
    Additionally "apk fix --directory-permissions" can be used to reset
    all directory permissions to the database defaults.
    
    Fixes #2966
    09e48d8f