mache.permissions.restore_owner_write

mache.permissions.restore_owner_write(base_paths, show_progress=True)[source]

Give the owner back write permission on path(s), recursively, so that a deployment made read-only with update_permissions(..., owner_writable=False) can be modified

Only paths owned by the current user are changed, and symlinks are skipped. A directory that is already owner-writable is assumed not to have been made read-only and is skipped without traversing it, which keeps this cheap for deployments that were never made read-only.

Parameters:
  • base_paths (str or list) – The base path(s) to restore owner write permission on. Paths that do not exist are ignored.

  • show_progress (bool, optional) – Whether to show a progress bar