MakeDirectory 403 Access Denied. #41656
-
Version
ProblemI have a problem with makeDirectory method.
However, if I use put method with file path and file name, it works without any error.
Is there anyone who had same experience that I have? Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Disclaimer: I don't use S3. I presume you are using the adapter suggested from the docs for AWS and looking through the source code for Laravel and the adapter I see the difference is that the directory is made by writing an empty string to the path you give it. |
Beta Was this translation helpful? Give feedback.
-
To clarify on the above comment "After I added it, it works as I expected"... I had this same issue. I have a bucket that does not allow public objects. Before upgrading to Laravel 9, this worked: // config/filesystems.php
'my_s3_bucket' => [
'driver' => 's3',
'region' => env('AWS_REGION'),
'bucket' => env('AWS_BUCKET'),
'url' => env('AWS_URL'),
'endpoint' => env('AWS_ENDPOINT'),
], but after upgrading to Laravel 9 (with 'options' => ['ACL' => 'private'], so the final config looks like: 'my_s3_bucket' => [
'driver' => 's3',
'region' => env('AWS_REGION'),
'bucket' => env('AWS_BUCKET'),
'url' => env('AWS_URL'),
'endpoint' => env('AWS_ENDPOINT'),
'options' => ['ACL' => 'private'],
], |
Beta Was this translation helpful? Give feedback.
Disclaimer: I don't use S3.
I presume you are using the adapter suggested from the docs for AWS and looking through the source code for Laravel and the adapter I see the difference is that the directory is made by writing an empty string to the path you give it.
Maybe you do not have direct access to create directories?