Set the permission for a folder in aws when the directory is using laravel file storage?

0 votes

I am using Storage::disk() to store file or retrieve file in laravel and there is some issue during setup of 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.

Oct 22, 2018 in AWS by findingbugs
• 4,770 points
401 views

1 answer to this question.

0 votes

you need the chown -R not the chmod to change the owner to whatever apache needs to be i believe its www-data

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 

answered Oct 22, 2018 by Priyaj
• 56,960 points

Related Questions In AWS

0 votes
1 answer

How to download the latest file in a S3 bucket using AWS CLI?

You can use the below command $ aws ...READ MORE

answered Sep 6, 2018 in AWS by Archana
• 4,090 points
5,192 views
0 votes
2 answers

How to skip headers when reading a CSV file in S3 and creating a table in AWS Athena?

Thanks for the answer. This should be clear ...READ MORE

answered Aug 14 in AWS by athenauserz
1,583 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer