Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

225
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!