Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

235
Vistas
Setting a laravel storage directory permission by ebextentions

I'm working on elastic beanstalk exextentions. A storage-permission-denied error occurs every deployments and I a have to type command to resolve that. Does the code below(.extensions/chmod.config), prevent the error occur ?

container_commands:
  01addpermission:
    command: "chmod -R 755 /var/app/current/storage"
  01clearcache:
    command: "php /var/app/current config:cache"
over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

The code sadly will not work. The reason is that container commands run when your app is in the staging folder, not in current folder:

The specified commands run as the root user, and are processed in alphabetical order by name. Container commands are run from the staging directory, where your source code is extracted prior to being deployed to the application server.

You can try to use relative paths:

container_commands:
  01addpermission:
    command: "chmod -R 755 ./storage"
  02clearcache:
    command: "php . config:cache"

The alternative is to use postdeploy platform hook which runs commands after you app is deployed:

Files here run after the Elastic Beanstalk platform engine deploys the application and proxy server

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda