Since v21.04.3 (maybe sooner) uploading images doesn't work if using S3 storage #2239

Closed
opened 2026-02-05 03:25:49 +03:00 by OVERLORD · 14 comments
Owner

Originally created by @diegopau on GitHub (May 10, 2021).

Describe the bug
We have been using Amazon S3 storage without issues up to version v21.04, last Friday I upgraded to v21.04.3 and we are unable to upload pictures if we use the "Insert an image" option in the editor. Attachments do work if we upload the same image from the Attachments panel. The error is "File path /updates/images/gallery/{image_name} could nto be uploaded to. Ensure it is writable to the server". The same error happens with v21.04.4

Steps To Reproduce
Steps to reproduce the behavior:

  1. Go to any document
  2. Edit the document
  3. Click on "insert an image" and drag and drop an image to upload it
  4. See error

Expected behavior
It should upload to Amazon S3

Screenshots
image

Your Configuration (please complete the following information):

  • Exact BookStack Version (Found in settings): v21.04.4
  • PHP Version: 8.0.3
  • Hosting Method (Nginx/Apache/Docker): Apache

Additional context
Our Amazon S3 bucket is set to public, and also we didn't touch the permissions in a while. I also didn't touch the .env file in a while.

Originally created by @diegopau on GitHub (May 10, 2021). **Describe the bug** We have been using Amazon S3 storage without issues up to version v21.04, last Friday I upgraded to v21.04.3 and we are unable to upload pictures if we use the "Insert an image" option in the editor. Attachments do work if we upload the same image from the Attachments panel. The error is "File path /updates/images/gallery/{image_name} could nto be uploaded to. Ensure it is writable to the server". The same error happens with v21.04.4 **Steps To Reproduce** Steps to reproduce the behavior: 1. Go to any document 2. Edit the document 3. Click on "insert an image" and drag and drop an image to upload it 4. See error **Expected behavior** It should upload to Amazon S3 **Screenshots** ![image](https://user-images.githubusercontent.com/315149/117678759-fa336f00-b1af-11eb-9638-c6384e1e0c49.png) **Your Configuration (please complete the following information):** - Exact BookStack Version (Found in settings): v21.04.4 - PHP Version: 8.0.3 - Hosting Method (Nginx/Apache/Docker): Apache **Additional context** Our Amazon S3 bucket is set to public, and also we didn't touch the permissions in a while. I also didn't touch the .env file in a while.
OVERLORD added the 🐛 Bug🏭 Back-End labels 2026-02-05 03:25:49 +03:00
Author
Owner

@ssddanbrown commented on GitHub (May 10, 2021):

Hi @diegopau,
Just double checked things against my test AWS S3 bucket and all appeared to work on image upload, using BookStack v21.04.4.

  • Does the composer install step definitely complete without issues on your system? Just ensuring you've definitely got the latest AWS files.
  • Are you using AWS S3, or a service that's AWS S3 compatible?
@ssddanbrown commented on GitHub (May 10, 2021): Hi @diegopau, Just double checked things against my test AWS S3 bucket and all appeared to work on image upload, using BookStack v21.04.4. - Does the `composer install` step definitely complete without issues on your system? Just ensuring you've definitely got the latest AWS files. - Are you using AWS S3, or a service that's AWS S3 compatible?
Author
Owner

@diegopau commented on GitHub (May 10, 2021):

@ssddanbrown thanks for checking this so quickly.

I can't say for sure what was the output for compose install when upgrading to 21.04.3 but for 21.04.4 I still had it in my terminal:

root@wiki:/var/www/bookstack# git pull origin release && composer install --no-dev && php artisan migrate
remote: Enumerating objects: 218, done.
remote: Counting objects: 100% (217/217), done.
remote: Compressing objects: 100% (96/96), done.
remote: Total 218 (delta 129), reused 189 (delta 118), pack-reused 1
Receiving objects: 100% (218/218), 145.72 KiB | 13.25 MiB/s, done.
Resolving deltas: 100% (129/129), completed with 41 local objects.
From https://github.com/BookStackApp/BookStack
 * branch              release    -> FETCH_HEAD
   2d8698a2..834f8e70  release    -> origin/release
Updating 2d8698a2..834f8e70
Fast-forward
 .env.example.complete                                  |    1 +
 .github/translators.txt                                |    3 +
 app/Config/saml2.php                                   |   10 +
 app/Entities/Tools/PageContent.php                     |   64 +--
 app/Exceptions/Handler.php                             |   48 ---
 app/Exceptions/NotifyException.php                     |   21 +-
 app/Exceptions/PrettyException.php                     |   39 +-
 app/Http/Controllers/HomeController.php                |    2 +-
 app/Http/Controllers/Images/ImageController.php        |    6 +-
 app/Http/Controllers/PageController.php                |    3 -
 app/Util/HtmlContentFilter.php                         |   71 ++++
 composer.lock                                          |  347 +++++++++------
 package-lock.json                                      | 1277 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 public/dist/export-styles.css                          |    2 +-
 public/dist/styles.css                                 |    2 +-
 resources/lang/ar/common.php                           |   22 +-
 resources/lang/ar/entities.php                         |   26 +-
 resources/lang/en/errors.php                           |    3 +
 resources/lang/id/common.php                           |    6 +-
 resources/lang/it/components.php                       |    2 +-
 resources/lang/it/entities.php                         |   12 +-
 resources/lang/it/errors.php                           |   10 +-
 resources/lang/it/passwords.php                        |    4 +-
 resources/lang/it/settings.php                         |   74 ++--
 resources/lang/it/validation.php                       |    2 +-
 resources/lang/ko/activities.php                       |    2 +-
 resources/lang/ko/common.php                           |    8 +-
 resources/lang/ko/entities.php                         |    4 +-
 resources/lang/ko/settings.php                         |   66 +--
 resources/lang/ko/validation.php                       |    2 +-
 resources/lang/nl/entities.php                         |   26 +-
 resources/lang/pt/common.php                           |    4 +-
 resources/sass/_buttons.scss                           |    1 +
 resources/sass/_header.scss                            |    1 +
 resources/sass/export-styles.scss                      |   24 +-
 resources/views/auth/forms/login/saml2.blade.php       |    2 +-
 resources/views/books/export.blade.php                 |   42 +-
 resources/views/chapters/export.blade.php              |   34 +-
 resources/views/errors/404.blade.php                   |    4 +-
 resources/views/export-layout.blade.php                |   15 +
 resources/views/pages/export.blade.php                 |   54 +--
 resources/views/partials/custom-head-content.blade.php |    5 -
 resources/views/partials/custom-head.blade.php         |    6 +-
 resources/views/partials/entity-export-meta.blade.php  |    4 +-
 resources/views/partials/export-custom-head.blade.php  |    5 +
 resources/views/partials/export-styles.blade.php       |   21 +
 routes/web.php                                         |    2 +-
 tests/Auth/Saml2Test.php                               |   35 ++
 tests/Entity/ExportTest.php                            |   33 ++
 tests/ErrorTest.php                                    |    7 +
 tests/Unit/ConfigTest.php                              |   13 +-
 version                                                |    2 +-
 52 files changed, 1948 insertions(+), 531 deletions(-)
 create mode 100644 app/Util/HtmlContentFilter.php
 create mode 100644 resources/views/export-layout.blade.php
 delete mode 100644 resources/views/partials/custom-head-content.blade.php
 create mode 100644 resources/views/partials/export-custom-head.blade.php
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Continue as root/super user [yes]? yes
> @php -r "!file_exists('bootstrap/cache/services.php') || @unlink('bootstrap/cache/services.php');"
Installing dependencies from lock file
Verifying lock file contents can be installed on current platform.
Package operations: 0 installs, 19 updates, 0 removals
  - Downloading symfony/css-selector (v4.4.22)
  - Downloading symfony/var-dumper (v4.4.22)
  - Downloading symfony/routing (v4.4.22)
  - Downloading symfony/process (v4.4.22)
  - Downloading symfony/mime (v5.2.7)
  - Downloading symfony/http-foundation (v4.4.22)
  - Downloading psr/log (1.1.4)
  - Downloading symfony/debug (v4.4.22)
  - Downloading symfony/error-handler (v4.4.22)
  - Downloading symfony/http-kernel (v4.4.22)
  - Downloading symfony/console (v4.4.22)
  - Downloading nesbot/carbon (2.47.0)
  - Downloading league/commonmark (1.6.1)
  - Downloading laravel/framework (v6.20.26)
  - Downloading doctrine/cache (1.11.0)
  - Downloading filp/whoops (2.12.1)
  - Downloading facade/flare-client-php (1.8.0)
  - Downloading guzzlehttp/psr7 (1.8.2)
  - Downloading aws/aws-sdk-php (3.180.5)
  - Upgrading symfony/css-selector (v4.4.20 => v4.4.22): Extracting archive
  - Upgrading symfony/var-dumper (v4.4.21 => v4.4.22): Extracting archive
  - Upgrading symfony/routing (v4.4.20 => v4.4.22): Extracting archive
  - Upgrading symfony/process (v4.4.20 => v4.4.22): Extracting archive
  - Upgrading symfony/mime (v5.2.6 => v5.2.7): Extracting archive
  - Upgrading symfony/http-foundation (v4.4.20 => v4.4.22): Extracting archive
  - Upgrading psr/log (1.1.3 => 1.1.4): Extracting archive
  - Upgrading symfony/debug (v4.4.20 => v4.4.22): Extracting archive
  - Upgrading symfony/error-handler (v4.4.21 => v4.4.22): Extracting archive
  - Upgrading symfony/http-kernel (v4.4.21 => v4.4.22): Extracting archive
  - Upgrading symfony/console (v4.4.21 => v4.4.22): Extracting archive
  - Upgrading nesbot/carbon (2.46.0 => 2.47.0): Extracting archive
  - Upgrading league/commonmark (1.5.8 => 1.6.1): Extracting archive
  - Upgrading laravel/framework (v6.20.23 => v6.20.26): Extracting archive
  - Upgrading doctrine/cache (1.10.2 => 1.11.0): Extracting archive
  - Upgrading filp/whoops (2.12.0 => 2.12.1): Extracting archive
  - Upgrading facade/flare-client-php (1.7.0 => 1.8.0): Extracting archive
  - Upgrading guzzlehttp/psr7 (1.8.1 => 1.8.2): Extracting archive
  - Upgrading aws/aws-sdk-php (3.178.6 => 3.180.5): Extracting archive
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
Discovered Package: barryvdh/laravel-dompdf
Discovered Package: barryvdh/laravel-snappy
Discovered Package: facade/ignition
Discovered Package: fideloper/proxy
Discovered Package: intervention/image
Discovered Package: laravel/socialite
Discovered Package: nesbot/carbon
Discovered Package: nunomaduro/collision
Discovered Package: socialiteproviders/manager
Package manifest generated successfully.
49 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
> @php artisan cache:clear
Application cache cleared!
> @php artisan view:clear
Compiled views cleared!
**************************************
*     Application In Production!     *
**************************************

 Do you really wish to run this command? (yes/no) [no]:
 > yes

Nothing to migrate.
root@wiki:/var/www/bookstack# php artisan cache:clear
Application cache cleared!
root@wiki:/var/www/bookstack# php artisan config:clear
Configuration cache cleared!
root@wiki:/var/www/bookstack# php artisan view:clear
Compiled views cleared!

I am using AWS S3 (not a compatible service).
I have this option enabled:
image

The policy for accessing the bucket is:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "s3:ListBucket"
            ],
            "Resource": [
                "arn:aws:s3:::oceanbuilders-wiki"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:PutObject",
                "s3:GetObject",
                "s3:DeleteObject"
            ],
            "Resource": [
                "arn:aws:s3:::oceanbuilders-wiki/*"
            ]
        }
    ]
}

so it doesn't distinguish from one folder or the other and however attachments ("files" folder) do upload correctly, images not.

It seems that the issue is on my side (since it works for you, probably for others that didn't report any issues) so I will surely investigate this a bit more on my end and report.

@diegopau commented on GitHub (May 10, 2021): @ssddanbrown thanks for checking this so quickly. I can't say for sure what was the output for compose install when upgrading to 21.04.3 but for 21.04.4 I still had it in my terminal: ``` root@wiki:/var/www/bookstack# git pull origin release && composer install --no-dev && php artisan migrate remote: Enumerating objects: 218, done. remote: Counting objects: 100% (217/217), done. remote: Compressing objects: 100% (96/96), done. remote: Total 218 (delta 129), reused 189 (delta 118), pack-reused 1 Receiving objects: 100% (218/218), 145.72 KiB | 13.25 MiB/s, done. Resolving deltas: 100% (129/129), completed with 41 local objects. From https://github.com/BookStackApp/BookStack * branch release -> FETCH_HEAD 2d8698a2..834f8e70 release -> origin/release Updating 2d8698a2..834f8e70 Fast-forward .env.example.complete | 1 + .github/translators.txt | 3 + app/Config/saml2.php | 10 + app/Entities/Tools/PageContent.php | 64 +-- app/Exceptions/Handler.php | 48 --- app/Exceptions/NotifyException.php | 21 +- app/Exceptions/PrettyException.php | 39 +- app/Http/Controllers/HomeController.php | 2 +- app/Http/Controllers/Images/ImageController.php | 6 +- app/Http/Controllers/PageController.php | 3 - app/Util/HtmlContentFilter.php | 71 ++++ composer.lock | 347 +++++++++------ package-lock.json | 1277 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- public/dist/export-styles.css | 2 +- public/dist/styles.css | 2 +- resources/lang/ar/common.php | 22 +- resources/lang/ar/entities.php | 26 +- resources/lang/en/errors.php | 3 + resources/lang/id/common.php | 6 +- resources/lang/it/components.php | 2 +- resources/lang/it/entities.php | 12 +- resources/lang/it/errors.php | 10 +- resources/lang/it/passwords.php | 4 +- resources/lang/it/settings.php | 74 ++-- resources/lang/it/validation.php | 2 +- resources/lang/ko/activities.php | 2 +- resources/lang/ko/common.php | 8 +- resources/lang/ko/entities.php | 4 +- resources/lang/ko/settings.php | 66 +-- resources/lang/ko/validation.php | 2 +- resources/lang/nl/entities.php | 26 +- resources/lang/pt/common.php | 4 +- resources/sass/_buttons.scss | 1 + resources/sass/_header.scss | 1 + resources/sass/export-styles.scss | 24 +- resources/views/auth/forms/login/saml2.blade.php | 2 +- resources/views/books/export.blade.php | 42 +- resources/views/chapters/export.blade.php | 34 +- resources/views/errors/404.blade.php | 4 +- resources/views/export-layout.blade.php | 15 + resources/views/pages/export.blade.php | 54 +-- resources/views/partials/custom-head-content.blade.php | 5 - resources/views/partials/custom-head.blade.php | 6 +- resources/views/partials/entity-export-meta.blade.php | 4 +- resources/views/partials/export-custom-head.blade.php | 5 + resources/views/partials/export-styles.blade.php | 21 + routes/web.php | 2 +- tests/Auth/Saml2Test.php | 35 ++ tests/Entity/ExportTest.php | 33 ++ tests/ErrorTest.php | 7 + tests/Unit/ConfigTest.php | 13 +- version | 2 +- 52 files changed, 1948 insertions(+), 531 deletions(-) create mode 100644 app/Util/HtmlContentFilter.php create mode 100644 resources/views/export-layout.blade.php delete mode 100644 resources/views/partials/custom-head-content.blade.php create mode 100644 resources/views/partials/export-custom-head.blade.php Do not run Composer as root/super user! See https://getcomposer.org/root for details Continue as root/super user [yes]? yes > @php -r "!file_exists('bootstrap/cache/services.php') || @unlink('bootstrap/cache/services.php');" Installing dependencies from lock file Verifying lock file contents can be installed on current platform. Package operations: 0 installs, 19 updates, 0 removals - Downloading symfony/css-selector (v4.4.22) - Downloading symfony/var-dumper (v4.4.22) - Downloading symfony/routing (v4.4.22) - Downloading symfony/process (v4.4.22) - Downloading symfony/mime (v5.2.7) - Downloading symfony/http-foundation (v4.4.22) - Downloading psr/log (1.1.4) - Downloading symfony/debug (v4.4.22) - Downloading symfony/error-handler (v4.4.22) - Downloading symfony/http-kernel (v4.4.22) - Downloading symfony/console (v4.4.22) - Downloading nesbot/carbon (2.47.0) - Downloading league/commonmark (1.6.1) - Downloading laravel/framework (v6.20.26) - Downloading doctrine/cache (1.11.0) - Downloading filp/whoops (2.12.1) - Downloading facade/flare-client-php (1.8.0) - Downloading guzzlehttp/psr7 (1.8.2) - Downloading aws/aws-sdk-php (3.180.5) - Upgrading symfony/css-selector (v4.4.20 => v4.4.22): Extracting archive - Upgrading symfony/var-dumper (v4.4.21 => v4.4.22): Extracting archive - Upgrading symfony/routing (v4.4.20 => v4.4.22): Extracting archive - Upgrading symfony/process (v4.4.20 => v4.4.22): Extracting archive - Upgrading symfony/mime (v5.2.6 => v5.2.7): Extracting archive - Upgrading symfony/http-foundation (v4.4.20 => v4.4.22): Extracting archive - Upgrading psr/log (1.1.3 => 1.1.4): Extracting archive - Upgrading symfony/debug (v4.4.20 => v4.4.22): Extracting archive - Upgrading symfony/error-handler (v4.4.21 => v4.4.22): Extracting archive - Upgrading symfony/http-kernel (v4.4.21 => v4.4.22): Extracting archive - Upgrading symfony/console (v4.4.21 => v4.4.22): Extracting archive - Upgrading nesbot/carbon (2.46.0 => 2.47.0): Extracting archive - Upgrading league/commonmark (1.5.8 => 1.6.1): Extracting archive - Upgrading laravel/framework (v6.20.23 => v6.20.26): Extracting archive - Upgrading doctrine/cache (1.10.2 => 1.11.0): Extracting archive - Upgrading filp/whoops (2.12.0 => 2.12.1): Extracting archive - Upgrading facade/flare-client-php (1.7.0 => 1.8.0): Extracting archive - Upgrading guzzlehttp/psr7 (1.8.1 => 1.8.2): Extracting archive - Upgrading aws/aws-sdk-php (3.178.6 => 3.180.5): Extracting archive Generating optimized autoload files > Illuminate\Foundation\ComposerScripts::postAutoloadDump > @php artisan package:discover --ansi Discovered Package: barryvdh/laravel-dompdf Discovered Package: barryvdh/laravel-snappy Discovered Package: facade/ignition Discovered Package: fideloper/proxy Discovered Package: intervention/image Discovered Package: laravel/socialite Discovered Package: nesbot/carbon Discovered Package: nunomaduro/collision Discovered Package: socialiteproviders/manager Package manifest generated successfully. 49 packages you are using are looking for funding. Use the `composer fund` command to find out more! > @php artisan cache:clear Application cache cleared! > @php artisan view:clear Compiled views cleared! ************************************** * Application In Production! * ************************************** Do you really wish to run this command? (yes/no) [no]: > yes Nothing to migrate. root@wiki:/var/www/bookstack# php artisan cache:clear Application cache cleared! root@wiki:/var/www/bookstack# php artisan config:clear Configuration cache cleared! root@wiki:/var/www/bookstack# php artisan view:clear Compiled views cleared! ``` I am using AWS S3 (not a compatible service). I have this option enabled: ![image](https://user-images.githubusercontent.com/315149/117700619-8b154500-b1c6-11eb-8d0b-24dd11831f97.png) The policy for accessing the bucket is: ``` { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:ListBucket" ], "Resource": [ "arn:aws:s3:::oceanbuilders-wiki" ] }, { "Effect": "Allow", "Action": [ "s3:PutObject", "s3:GetObject", "s3:DeleteObject" ], "Resource": [ "arn:aws:s3:::oceanbuilders-wiki/*" ] } ] } ``` so it doesn't distinguish from one folder or the other and however attachments ("files" folder) do upload correctly, images not. It seems that the issue is on my side (since it works for you, probably for others that didn't report any issues) so I will surely investigate this a bit more on my end and report.
Author
Owner

@ssddanbrown commented on GitHub (May 10, 2021):

@diegopau Looks like the composer install all went okay.

I did change the image upload for AWS-style storage to be upload+set-public ACL in a single action instead of doing those as two separate operations, Might have affected things but not sure why.

I did add better logging of these kind of errors when doing changes, Check your storage/logs/laravel.log file, Searching for lines starting with Error when attempting image upload: for more details.

@ssddanbrown commented on GitHub (May 10, 2021): @diegopau Looks like the composer install all went okay. I did change the image upload for AWS-style storage to be upload+set-public ACL in a single action instead of doing those as two separate operations, Might have affected things but not sure why. I did add better logging of these kind of errors when doing changes, Check your `storage/logs/laravel.log` file, Searching for lines starting with `Error when attempting image upload:` for more details.
Author
Owner

@diegopau commented on GitHub (May 10, 2021):

@ssddanbrown

Yes, there are indeed many errors related with image upload, they all look like this:

<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>4KYQK8 (truncated...)
 AccessDenied (client): Access Denied - <?xml version="1.0" encoding="UTF-8"?>
<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>4KYQK870R2VGSYSH</RequestId><HostId>OzKSpdC2T068SqaGckRxKiqOtk4pMCBx4vWGnKhG3NGuJRPrn83C7+ZiVg+b2KA3DWq8RRLBVlk=</HostId></Error>  
[2021-05-10 13:10:01] production.ERROR: Error when attempting image upload:Error executing "PutObject" on "https://oceanbuilders-wiki.s3.us-east-2.amazonaws.com/uploads/images/gallery/2021-05/A05TwU1FfVR8IJvi-seapod-angles-email.png"; AWS HTTP error: Client error: `PUT https://oceanbuilders-wiki.s3.us-east-2.amazonaws.com/uploads/images/gallery/2021-05/A05TwU1FfVR8IJvi-seapod-angles-email.png` resulted in a `403 Forbidden` response:
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>RCSC2R (truncated...)
 AccessDenied (client): Access Denied - <?xml version="1.0" encoding="UTF-8"?>
<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>RCSC2R42B8T4KYVZ</RequestId><HostId>0DRgnw2LrcLIaqyEnHmoqH3SZ0fZR74mUgba8NWzqNWod+whxCINI9GjsQYIe9J/ik3+4r9yk0E=</HostId></Error>  
[2021-05-10 13:13:25] production.ERROR: Error when attempting image upload:Error executing "PutObject" on "https://oceanbuilders-wiki.s3.us-east-2.amazonaws.com/uploads/images/gallery/2021-05/SdI0LPfEtLKPJQmr-edit-about-us-1.jpg"; AWS HTTP error: Client error: `PUT https://oceanbuilders-wiki.s3.us-east-2.amazonaws.com/uploads/images/gallery/2021-05/SdI0LPfEtLKPJQmr-edit-about-us-1.jpg` resulted in a `403 Forbidden` response:
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>T9YSFR (truncated...)
 AccessDenied (client): Access Denied - <?xml version="1.0" encoding="UTF-8"?>
<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>T9YSFRKZGCRCQ5SC</RequestId><HostId>5VTyNv0a/4/0hg8qXiANpwgy2RoOSakL43zXy4Q/ZRqR0fYPTMX/Mv8ryUVzSQIVA0Dj+KvcdPc=</HostId></Error>  
[2021-05-10 14:51:01] production.ERROR: Error when attempting image upload:Error executing "PutObject" on "https://oceanbuilders-wiki.s3.us-east-2.amazonaws.com/uploads/images/gallery/2021-05/ng1YwlAZEBmCIBll-default-avatar.jpg"; AWS HTTP error: Client error: `PUT https://oceanbuilders-wiki.s3.us-east-2.amazonaws.com/uploads/images/gallery/2021-05/ng1YwlAZEBmCIBll-default-avatar.jpg` resulted in a `403 Forbidden` response:
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>13Y8ED (truncated...)
 AccessDenied (client): Access Denied - <?xml version="1.0" encoding="UTF-8"?>
<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>13Y8ED1RYXQPY3GT</RequestId><HostId>DbqmI8N9WPes8+0FU/myYcwkgE4Tfg9XncVBwbnxwma/yWEw19FewnP2nu0hASAlZvKiX9okGF4=</HostId></Error>  

there are also these error but probably unrelated:

[2021-05-09 17:49:58] production.ERROR: Allowed memory size of 134217728 bytes exhausted (tried to allocate 63521742 bytes) {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalErrorException(code: 1): Allowed memory size of 134217728 bytes exhausted (tried to allocate 63521742 bytes) at /var/www/bookstack/app/Entities/Tools/ExportFormatter.php:158)
[stacktrace]
#0 {main}
"} 
[2021-05-09 18:11:12] production.ERROR: Call to a member function bind() on null {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Call to a member function bind() on null at /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Support/HigherOrderTapProxy.php:34)
[stacktrace]
#0 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Router.php(598): Illuminate\\Support\\HigherOrderTapProxy->__call()
#1 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(261): Illuminate\\Routing\\Router->respondWithRoute()
#2 /var/www/bookstack/app/Exceptions/Handler.php(81): Illuminate\\Support\\Facades\\Facade::__callStatic()
#3 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(51): BookStack\\Exceptions\\Handler->render()
#4 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(176): Illuminate\\Routing\\Pipeline->handleException()
#5 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(105): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#6 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Router.php(683): Illuminate\\Pipeline\\Pipeline->then()
#7 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Router.php(658): Illuminate\\Routing\\Router->runRouteWithinStack()
#8 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Router.php(624): Illuminate\\Routing\\Router->runRoute()
#9 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Router.php(613): Illuminate\\Routing\\Router->dispatchToRoute()
#10 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(170): Illuminate\\Routing\\Router->dispatch()
#11 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(130): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}()
#12 /var/www/bookstack/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#13 /var/www/bookstack/app/Http/Middleware/TrustProxies.php(39): Fideloper\\Proxy\\TrustProxies->handle()
#14 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): BookStack\\Http\\Middleware\\TrustProxies->handle()
#15 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#16 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle()
#17 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#18 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle()
#19 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(63): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#20 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode->handle()
#21 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(105): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#22 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(145): Illuminate\\Pipeline\\Pipeline->then()
#23 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(110): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter()
#24 /var/www/bookstack/public/index.php(56): Illuminate\\Foundation\\Http\\Kernel->handle()
#25 {main}
"} 
[2021-05-10 07:33:44] production.ERROR: BookStack\Http\Controllers\UserController::edit(): Argument #1 ($id) must be of type int, string given, called in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Controller.php on line 54 {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): BookStack\\Http\\Controllers\\UserController::edit(): Argument #1 ($id) must be of type int, string given, called in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Controller.php on line 54 at /var/www/bookstack/app/Http/Controllers/UserController.php:117)
[stacktrace]
#0 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): BookStack\\Http\\Controllers\\UserController->edit()
#1 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\\Routing\\Controller->callAction()
#2 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Route.php(219): Illuminate\\Routing\\ControllerDispatcher->dispatch()
#3 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Route.php(176): Illuminate\\Routing\\Route->runController()
#4 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Router.php(681): Illuminate\\Routing\\Route->run()
#5 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(130): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}()
#6 /var/www/bookstack/app/Http/Middleware/Authenticate.php(29): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#7 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): BookStack\\Http\\Middleware\\Authenticate->handle()
#8 /var/www/bookstack/app/Http/Middleware/Localization.php(75): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#9 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): BookStack\\Http\\Middleware\\Localization->handle()
#10 /var/www/bookstack/app/Http/Middleware/RunThemeActions.php(25): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#11 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): BookStack\\Http\\Middleware\\RunThemeActions->handle()
#12 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(78): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#13 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken->handle()
#14 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#15 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle()
#16 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(56): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#17 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Session\\Middleware\\StartSession->handle()
#18 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#19 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle()
#20 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#21 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Cookie\\Middleware\\EncryptCookies->handle()
#22 /var/www/bookstack/app/Http/Middleware/ControlIframeSecurity.php(31): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#23 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): BookStack\\Http\\Middleware\\ControlIframeSecurity->handle()
#24 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(105): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#25 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Router.php(683): Illuminate\\Pipeline\\Pipeline->then()
#26 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Router.php(658): Illuminate\\Routing\\Router->runRouteWithinStack()
#27 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Router.php(624): Illuminate\\Routing\\Router->runRoute()
#28 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Router.php(613): Illuminate\\Routing\\Router->dispatchToRoute()
#29 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(170): Illuminate\\Routing\\Router->dispatch()
#30 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(130): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}()
#31 /var/www/bookstack/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#32 /var/www/bookstack/app/Http/Middleware/TrustProxies.php(39): Fideloper\\Proxy\\TrustProxies->handle()
#33 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): BookStack\\Http\\Middleware\\TrustProxies->handle()
#34 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#35 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle()
#36 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#37 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle()
#38 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(63): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#39 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode->handle()
#40 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(105): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#41 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(145): Illuminate\\Pipeline\\Pipeline->then()
#42 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(110): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter()
#43 /var/www/bookstack/public/index.php(56): Illuminate\\Foundation\\Http\\Kernel->handle()
#44 {main}
"} 
@diegopau commented on GitHub (May 10, 2021): @ssddanbrown Yes, there are indeed many errors related with image upload, they all look like this: ``` <Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>4KYQK8 (truncated...) AccessDenied (client): Access Denied - <?xml version="1.0" encoding="UTF-8"?> <Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>4KYQK870R2VGSYSH</RequestId><HostId>OzKSpdC2T068SqaGckRxKiqOtk4pMCBx4vWGnKhG3NGuJRPrn83C7+ZiVg+b2KA3DWq8RRLBVlk=</HostId></Error> [2021-05-10 13:10:01] production.ERROR: Error when attempting image upload:Error executing "PutObject" on "https://oceanbuilders-wiki.s3.us-east-2.amazonaws.com/uploads/images/gallery/2021-05/A05TwU1FfVR8IJvi-seapod-angles-email.png"; AWS HTTP error: Client error: `PUT https://oceanbuilders-wiki.s3.us-east-2.amazonaws.com/uploads/images/gallery/2021-05/A05TwU1FfVR8IJvi-seapod-angles-email.png` resulted in a `403 Forbidden` response: <?xml version="1.0" encoding="UTF-8"?> <Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>RCSC2R (truncated...) AccessDenied (client): Access Denied - <?xml version="1.0" encoding="UTF-8"?> <Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>RCSC2R42B8T4KYVZ</RequestId><HostId>0DRgnw2LrcLIaqyEnHmoqH3SZ0fZR74mUgba8NWzqNWod+whxCINI9GjsQYIe9J/ik3+4r9yk0E=</HostId></Error> [2021-05-10 13:13:25] production.ERROR: Error when attempting image upload:Error executing "PutObject" on "https://oceanbuilders-wiki.s3.us-east-2.amazonaws.com/uploads/images/gallery/2021-05/SdI0LPfEtLKPJQmr-edit-about-us-1.jpg"; AWS HTTP error: Client error: `PUT https://oceanbuilders-wiki.s3.us-east-2.amazonaws.com/uploads/images/gallery/2021-05/SdI0LPfEtLKPJQmr-edit-about-us-1.jpg` resulted in a `403 Forbidden` response: <?xml version="1.0" encoding="UTF-8"?> <Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>T9YSFR (truncated...) AccessDenied (client): Access Denied - <?xml version="1.0" encoding="UTF-8"?> <Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>T9YSFRKZGCRCQ5SC</RequestId><HostId>5VTyNv0a/4/0hg8qXiANpwgy2RoOSakL43zXy4Q/ZRqR0fYPTMX/Mv8ryUVzSQIVA0Dj+KvcdPc=</HostId></Error> [2021-05-10 14:51:01] production.ERROR: Error when attempting image upload:Error executing "PutObject" on "https://oceanbuilders-wiki.s3.us-east-2.amazonaws.com/uploads/images/gallery/2021-05/ng1YwlAZEBmCIBll-default-avatar.jpg"; AWS HTTP error: Client error: `PUT https://oceanbuilders-wiki.s3.us-east-2.amazonaws.com/uploads/images/gallery/2021-05/ng1YwlAZEBmCIBll-default-avatar.jpg` resulted in a `403 Forbidden` response: <?xml version="1.0" encoding="UTF-8"?> <Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>13Y8ED (truncated...) AccessDenied (client): Access Denied - <?xml version="1.0" encoding="UTF-8"?> <Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>13Y8ED1RYXQPY3GT</RequestId><HostId>DbqmI8N9WPes8+0FU/myYcwkgE4Tfg9XncVBwbnxwma/yWEw19FewnP2nu0hASAlZvKiX9okGF4=</HostId></Error> ``` there are also these error but probably unrelated: ``` [2021-05-09 17:49:58] production.ERROR: Allowed memory size of 134217728 bytes exhausted (tried to allocate 63521742 bytes) {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalErrorException(code: 1): Allowed memory size of 134217728 bytes exhausted (tried to allocate 63521742 bytes) at /var/www/bookstack/app/Entities/Tools/ExportFormatter.php:158) [stacktrace] #0 {main} "} [2021-05-09 18:11:12] production.ERROR: Call to a member function bind() on null {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Call to a member function bind() on null at /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Support/HigherOrderTapProxy.php:34) [stacktrace] #0 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Router.php(598): Illuminate\\Support\\HigherOrderTapProxy->__call() #1 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(261): Illuminate\\Routing\\Router->respondWithRoute() #2 /var/www/bookstack/app/Exceptions/Handler.php(81): Illuminate\\Support\\Facades\\Facade::__callStatic() #3 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(51): BookStack\\Exceptions\\Handler->render() #4 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(176): Illuminate\\Routing\\Pipeline->handleException() #5 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(105): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #6 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Router.php(683): Illuminate\\Pipeline\\Pipeline->then() #7 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Router.php(658): Illuminate\\Routing\\Router->runRouteWithinStack() #8 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Router.php(624): Illuminate\\Routing\\Router->runRoute() #9 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Router.php(613): Illuminate\\Routing\\Router->dispatchToRoute() #10 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(170): Illuminate\\Routing\\Router->dispatch() #11 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(130): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}() #12 /var/www/bookstack/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #13 /var/www/bookstack/app/Http/Middleware/TrustProxies.php(39): Fideloper\\Proxy\\TrustProxies->handle() #14 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): BookStack\\Http\\Middleware\\TrustProxies->handle() #15 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #16 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle() #17 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #18 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle() #19 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(63): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #20 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode->handle() #21 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(105): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #22 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(145): Illuminate\\Pipeline\\Pipeline->then() #23 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(110): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter() #24 /var/www/bookstack/public/index.php(56): Illuminate\\Foundation\\Http\\Kernel->handle() #25 {main} "} [2021-05-10 07:33:44] production.ERROR: BookStack\Http\Controllers\UserController::edit(): Argument #1 ($id) must be of type int, string given, called in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Controller.php on line 54 {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): BookStack\\Http\\Controllers\\UserController::edit(): Argument #1 ($id) must be of type int, string given, called in /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Controller.php on line 54 at /var/www/bookstack/app/Http/Controllers/UserController.php:117) [stacktrace] #0 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): BookStack\\Http\\Controllers\\UserController->edit() #1 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\\Routing\\Controller->callAction() #2 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Route.php(219): Illuminate\\Routing\\ControllerDispatcher->dispatch() #3 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Route.php(176): Illuminate\\Routing\\Route->runController() #4 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Router.php(681): Illuminate\\Routing\\Route->run() #5 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(130): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}() #6 /var/www/bookstack/app/Http/Middleware/Authenticate.php(29): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #7 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): BookStack\\Http\\Middleware\\Authenticate->handle() #8 /var/www/bookstack/app/Http/Middleware/Localization.php(75): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #9 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): BookStack\\Http\\Middleware\\Localization->handle() #10 /var/www/bookstack/app/Http/Middleware/RunThemeActions.php(25): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #11 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): BookStack\\Http\\Middleware\\RunThemeActions->handle() #12 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(78): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #13 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken->handle() #14 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #15 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle() #16 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(56): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #17 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Session\\Middleware\\StartSession->handle() #18 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #19 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle() #20 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #21 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Cookie\\Middleware\\EncryptCookies->handle() #22 /var/www/bookstack/app/Http/Middleware/ControlIframeSecurity.php(31): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #23 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): BookStack\\Http\\Middleware\\ControlIframeSecurity->handle() #24 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(105): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #25 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Router.php(683): Illuminate\\Pipeline\\Pipeline->then() #26 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Router.php(658): Illuminate\\Routing\\Router->runRouteWithinStack() #27 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Router.php(624): Illuminate\\Routing\\Router->runRoute() #28 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Routing/Router.php(613): Illuminate\\Routing\\Router->dispatchToRoute() #29 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(170): Illuminate\\Routing\\Router->dispatch() #30 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(130): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}() #31 /var/www/bookstack/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #32 /var/www/bookstack/app/Http/Middleware/TrustProxies.php(39): Fideloper\\Proxy\\TrustProxies->handle() #33 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): BookStack\\Http\\Middleware\\TrustProxies->handle() #34 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #35 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle() #36 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #37 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle() #38 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(63): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #39 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode->handle() #40 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(105): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #41 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(145): Illuminate\\Pipeline\\Pipeline->then() #42 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(110): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter() #43 /var/www/bookstack/public/index.php(56): Illuminate\\Foundation\\Http\\Kernel->handle() #44 {main} "} ```
Author
Owner

@diegopau commented on GitHub (May 12, 2021):

@ssddanbrown I rolled back to 21.04.2 and it is working now. So it seems to be introduced in 21.04.3

@diegopau commented on GitHub (May 12, 2021): @ssddanbrown I rolled back to 21.04.2 and it is working now. So it seems to be introduced in 21.04.3
Author
Owner

@ssddanbrown commented on GitHub (May 13, 2021):

Okay, Looks like my presumption of (PUT Request with ACLs) being the same as (PUT Request then ACL request) was wrong. From the AWS docs:

If the IAM user must update the object's access control list (ACL) during the upload, then the user also must have permissions for s3:PutObjectAcl in their IAM policy.

So looks like providing the IAM policy for the connected BookStack account with PutObjectAcl permission would work. This may break other instances though.

Gets tricky, I made this change to simplify things to work better with S3-like systems that were breaking the old way. Might need to do some config sniffing and treat S3 differently to S3-like here.

@ssddanbrown commented on GitHub (May 13, 2021): Okay, Looks like my presumption of (PUT Request with ACLs) being the same as (PUT Request then ACL request) was wrong. From the [AWS docs](https://aws.amazon.com/premiumsupport/knowledge-center/s3-403-upload-bucket/): > If the IAM user must update the object's access control list (ACL) during the upload, then the user also must have permissions for s3:PutObjectAcl in their IAM policy. So looks like providing the IAM policy for the connected BookStack account with `PutObjectAcl` permission would work. This may break other instances though. Gets tricky, I made this change to simplify things to work better with S3-like systems that were breaking the old way. Might need to do some config sniffing and treat S3 differently to S3-like here.
Author
Owner

@diegopau commented on GitHub (May 13, 2021):

Alright @ssddanbrown thank you for the update, this explains the 403 Forbidden responses. For now I will stay on 21.04.2 and keep an eye on this issue in case there is a change on the AWS S3 implementation.

@diegopau commented on GitHub (May 13, 2021): Alright @ssddanbrown thank you for the update, this explains the 403 Forbidden responses. For now I will stay on 21.04.2 and keep an eye on this issue in case there is a change on the AWS S3 implementation.
Author
Owner

@ssddanbrown commented on GitHub (May 15, 2021):

@diegopau I've just released v21.04.5 with a patch to change the behaviour back to that of 21.04.2 for AWS S3 usage, but with some tweaks to avoid issues for those using non-AWS S3 services.I'll therefore close this off but just shout if you still have any issues after upgrading to v21.04.5.

@ssddanbrown commented on GitHub (May 15, 2021): @diegopau I've just released v21.04.5 with a patch to change the behaviour back to that of 21.04.2 for AWS S3 usage, but with some tweaks to avoid issues for those using non-AWS S3 services.I'll therefore close this off but just shout if you still have any issues after upgrading to v21.04.5.
Author
Owner

@diegopau commented on GitHub (May 17, 2021):

Thanks, I can confirm that all is working after upgrading to 21.04.5

@diegopau commented on GitHub (May 17, 2021): Thanks, I can confirm that all is working after upgrading to 21.04.5
Author
Owner

@ssddanbrown commented on GitHub (May 17, 2021):

@diegopau Awesome, Thanks for confirming!

@ssddanbrown commented on GitHub (May 17, 2021): @diegopau Awesome, Thanks for confirming!
Author
Owner

@sherpya commented on GitHub (May 19, 2021):

I suspect c1f070a136 broke local storage ffile permissions, now they are 640 instead of 644

@sherpya commented on GitHub (May 19, 2021): I suspect c1f070a1368ed49ce1e5b362fce4a88ad8077d00 broke local storage ffile permissions, now they are 640 instead of 644
Author
Owner

@ssddanbrown commented on GitHub (May 19, 2021):

Did yours break @sherpya? I'd have thought that in the vast majority of cases these files will be uploaded with an owner and/or group matching the server process that would be serving static files.

@ssddanbrown commented on GitHub (May 19, 2021): Did yours break @sherpya? I'd have thought that in the vast majority of cases these files will be uploaded with an owner and/or group matching the server process that would be serving static files.
Author
Owner

@sherpya commented on GitHub (May 20, 2021):

Did yours break @sherpya? I'd have thought that in the vast majority of cases these files will be uploaded with an owner and/or group matching the server process that would be serving static files.

yes I use php-fpm with a dedicated user for bookstack, static files are server by nginx that runs as different user

@sherpya commented on GitHub (May 20, 2021): > Did yours break @sherpya? I'd have thought that in the vast majority of cases these files will be uploaded with an owner and/or group matching the server process that would be serving static files. yes I use php-fpm with a dedicated user for bookstack, static files are server by nginx that runs as different user
Author
Owner

@ssddanbrown commented on GitHub (May 21, 2021):

🤦 Thanks @sherpya for confirming and my apologies. Have opened #2758, assigned to the next patch, to cover this.

@ssddanbrown commented on GitHub (May 21, 2021): 🤦 Thanks @sherpya for confirming and my apologies. Have opened #2758, assigned to the next patch, to cover this.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2239