Skip to content

fix: set group-writable permissions on shared storage during deploy - #35

Merged
loadinglucian merged 1 commit into
mainfrom
fix/deploy-shared-storage-permissions
Feb 25, 2026
Merged

fix: set group-writable permissions on shared storage during deploy#35
loadinglucian merged 1 commit into
mainfrom
fix/deploy-shared-storage-permissions

Conversation

@loadinglucian

Copy link
Copy Markdown
Owner

Adds a set_group_writable_tree helper to the deploy script that applies SGID (2775) on directories and 664 on files, ensuring the shared storage tree stays writable for both the deploy user and PHP-FPM (www-data). The helper is called after shared directories are created and again after Artisan commands run (which can create new cache/session/log paths).

Also applies the same permissions to the shared SQLite database path, and fixes YAML sequence formatting in inventory.yml.

Add set_group_writable_tree helper to keep shared storage paths writable
for both the deploy user and PHP-FPM (www-data). Applies SGID + 2775 on
directories and 664 on files so new entries inherit the group. Also cleans
up YAML sequence formatting in inventory.yml.
@loadinglucian
loadinglucian merged commit 1217036 into main Feb 25, 2026
6 checks passed
@loadinglucian
loadinglucian deleted the fix/deploy-shared-storage-permissions branch February 25, 2026 14:03
@coderabbitai

coderabbitai Bot commented Feb 25, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between deaffd4 and 5a1acb6.

📒 Files selected for processing (2)
  • .deployer/inventory.yml
  • .deployer/scripts/deploy.sh

📝 Walkthrough

Walkthrough

Restructures deployment inventory YAML configuration into nested list format for servers and sites. Adds a permission helper function to the deployment script and applies group-writable permissions to shared storage directories and database paths. Replaces cache clearing mechanism with an artisan command.

Changes

Cohort / File(s) Summary
Inventory Configuration
.deployer/inventory.yml
Converts flat YAML list entries for servers and sites into two-level nested structures with empty parent list items.
Deployment Permissions
.deployer/scripts/deploy.sh
Introduces set_group_writable_tree() helper function to recursively set group-writable permissions (2775 for directories, 664 for files). Applies permissions to shared storage and database paths. Replaces docs-cache clear with docs:clear artisan call and reapplies permissions afterward.

Possibly related PRs

  • deployer-php#297: Addresses shared storage creation and preparation in deployment scaffolding, overlapping with the new shared storage permission steps.
  • deploy-me#7: Modifies the same deployment artifacts (.deployer/inventory.yml and .deployer/scripts/deploy.sh) at the code level.
  • deployer-php#299: Consolidates deployment scripts into .deployer/scripts and moves inventory to .deployer/inventory.yml, directly overlapping with this PR's file modifications.

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Comment @coderabbitai help to get the list of available commands and usage tips.

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