Fix permissions

SolidGroundUX DocumentationSolidGroundUX
NL

fn: sgnd_fix_permissions

Purpose

Recursively set directory modes to 755 and file modes to 644.

Description

This removes executable bits from regular files and does not preserve existing custom modes.

Arguments

  • $1 — File or directory path.

Side effects

Runs find/chmod on directories and files below the path.

Returns

Returns the status of the final find/chmod command.

Usage

  sgnd_fix_permissions "/tmp/sgnd-example"