Skip to content

Read-only app/etc/ #26292

Open
Open
@kassner

Description

@kassner

Is there a reason for the app/etc/ path to be writable during php bin/magento setup:upgrade --keep-generated?

Looking into Magento\Framework\Setup\FilePermissions, the getMissingWritableDirectoriesForDbUpgrade asks for app/etc/ to be writable, but it's not clear what is being written to that folder.

My goal is to deploy magento in a read-only environment (except for the var/ folder), for an already installed Magento, so theoretically none of those files should be changed compared to what the CI builds.

Steps to reproduce

  • Run chmod 555 app/etc
  • Run chmod 444 app/etc/*
  • Run ./bin/magento setup:upgrade --keep-generated

Actual Result

image

Additional Information

please do take also in consideration that it happens for env.php which in a cloud horizontal scaling environment with immutable artefacts deployed (Kubernetes, docker, aws lambda etc) is important to be able to manage it ourselves.

Command to output required changes would greatly help, as we could update the env.php for example in the secret Kubernetes injects and redeploy, the system having all state as it expects.

Metadata

Metadata

Assignees

Labels

Area: FrameworkIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P3May be fixed according to the position in the backlog.Progress: PR in progressReported on 2.4.xIndicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchTriage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject it

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions