Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

226
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda