Skip to content

fix: bugs in entrypoint scripts#187

Merged
sjinks merged 1 commit intomainfrom
pltfrm-2068-permissionnot-found-errors-in-lando-entrypoint-scripts
Mar 9, 2026
Merged

fix: bugs in entrypoint scripts#187
sjinks merged 1 commit intomainfrom
pltfrm-2068-permissionnot-found-errors-in-lando-entrypoint-scripts

Conversation

@sjinks
Copy link
Member

@sjinks sjinks commented Mar 9, 2026

This pull request introduces improvements to the permission handling scripts in the Lando core plugins, focusing on safer operations and enhanced robustness. The main changes involve adding checks before performing ownership and permission modifications to avoid errors when directories are missing or not writable, and improving the handling of user home directories.

Permission handling improvements:

  • Added a check to ensure /helpers is writable before attempting to change file permissions in lando-entrypoint.sh, preventing errors when the directory is not writable.
  • Modified perm_sweep() in user-perm-helpers.sh to check if /usr/local/bin exists before running chown, reducing unnecessary errors.
  • Consolidated and simplified background ownership sweeps for /usr/local directories, checking for existence before running find commands, and removed redundant sweeps for subdirectories.

User home directory handling:

  • Enhanced the sweep for the user's home directory by checking if getent is available, and confirming the directory exists before running ownership changes, improving reliability and avoiding potential failures.

Parameter usage correction:

  • Updated the invocation of perm_sweep in user-perms.sh to use the group ID variable directly, ensuring correct parameter passing.

@sjinks sjinks self-assigned this Mar 9, 2026
@sjinks sjinks merged commit d32449f into main Mar 9, 2026
18 checks passed
@sjinks sjinks deleted the pltfrm-2068-permissionnot-found-errors-in-lando-entrypoint-scripts branch March 9, 2026 06:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant