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,780 points
2,168 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
• 58,090 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,170 points
18,940 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP