0

I am using Storage::disk() to store file or retrieve file in laravel. There is some issue occurred during i setup aws server.

Storage::disk('backup_uploads')->put('/try/'.'abcc.txt', 'abcc');

Whenever the directories created the file is not allowed to be deleted.

The permission auto set to

Permission for 'try' folder : drwxr-xr-x

My user and group should be

ec2-user/ec2user

but the 'try' folder directories show

apache/apache

How i can create the directories using the method above and always make it full accessible. Let the permission to be drwxrwxrwx.

Thanks.

Crazy
  • 847
  • 1
  • 18
  • 41
  • i believe you need the chown -R not the chmod to change the owner to whatever apache needs to be i believe its www-data but i could be wrong – Sari Yono Mar 26 '18 at 14:02
  • My folder is dynamically created due to the permission i unable to delete it with cronjob. Any idea how to make it able to get permission on delete when the file created? How should i set the permission thing? – Crazy Mar 26 '18 at 14:09
  • before running the cron job can you run the chown and chmod on it? as a quick fix, you should investigate how to create the folder with a certain permission etc. i believe the laravel Storage have a helper method for that – Sari Yono Mar 26 '18 at 14:12

0 Answers0