Image upload returns error with Azured File Share mounted to image storage location #3786

Closed
opened 2026-02-05 07:28:28 +03:00 by OVERLORD · 10 comments
Owner

Originally created by @RHaest on GitHub (May 8, 2023).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

Image upload returns an error in the laravel.log: [2023-05-08 09:11:47] production.ERROR: Error when attempting image upload:Unable to set visibility for file uploads/images/gallery/2023-05/

The file is uploaded however.

Mapped an Azure File Share to the /config folder. In both the container and the Azure File Share, the file is visible so it is actually uploaded. Permissions look ok.

Attachments works fine. Book covers also return error.

Exact BookStack Version

23.05

Log Content

Laravel.log
[2023-05-08 09:11:47] production.ERROR: Error when attempting image upload:Unable to set visibility for file uploads/images/gallery/2023-05/

Other logs no error (nginx / php)

PHP Version

No response

Hosting Environment

Using docker (linuxserver image) on Azure Container Apps with a mounted volume / Azure File Share

Originally created by @RHaest on GitHub (May 8, 2023). ### Attempted Debugging - [X] I have read the debugging page ### Searched GitHub Issues - [X] I have searched GitHub for the issue. ### Describe the Scenario Image upload returns an error in the laravel.log: [2023-05-08 09:11:47] production.ERROR: Error when attempting image upload:Unable to set visibility for file uploads/images/gallery/2023-05/ The file is uploaded however. Mapped an Azure File Share to the /config folder. In both the container and the Azure File Share, the file is visible so it is actually uploaded. Permissions look ok. Attachments works fine. Book covers also return error. ### Exact BookStack Version 23.05 ### Log Content Laravel.log [2023-05-08 09:11:47] production.ERROR: Error when attempting image upload:Unable to set visibility for file uploads/images/gallery/2023-05/ Other logs no error (nginx / php) ### PHP Version _No response_ ### Hosting Environment Using docker (linuxserver image) on Azure Container Apps with a mounted volume / Azure File Share
OVERLORD added the 🐕 Support label 2026-02-05 07:28:28 +03:00
Author
Owner

@nathanclayton commented on GitHub (May 8, 2023):

I'm seeing this same error using the linuxserver image 23.05.01 when using S3 to host the files.

[2023-05-08 19:47:47] production.ERROR: Error when attempting image upload:Unable to set visibility for file uploads/images/gallery/2023-05/BvWy2lw6P2gLOHcB-INd......
@nathanclayton commented on GitHub (May 8, 2023): I'm seeing this same error using the linuxserver image 23.05.01 when using S3 to host the files. ``` [2023-05-08 19:47:47] production.ERROR: Error when attempting image upload:Unable to set visibility for file uploads/images/gallery/2023-05/BvWy2lw6P2gLOHcB-INd...... ```
Author
Owner

@ssddanbrown commented on GitHub (May 9, 2023):

@RHaest @nathanclayton Question for both of you, Is this something that was previously working (with the same BookStack configuration)?

@ssddanbrown commented on GitHub (May 9, 2023): @RHaest @nathanclayton Question for both of you, Is this something that was previously working (with the same BookStack configuration)?
Author
Owner

@RHaest commented on GitHub (May 9, 2023):

@ssddanbrown thanks for your reply, unfortunately I am new to Bookstack, so this is the first version I'm trying.

@RHaest commented on GitHub (May 9, 2023): @ssddanbrown thanks for your reply, unfortunately I am new to Bookstack, so this is the first version I'm trying.
Author
Owner

@nathanclayton commented on GitHub (May 10, 2023):

@ssddanbrown This was previously working. It worked using 22.10.2, and the next upgrade I made to 23.02.3 it started to fail, and continued to fail with 23.05.1

@nathanclayton commented on GitHub (May 10, 2023): @ssddanbrown This was previously working. It worked using `22.10.2`, and the next upgrade I made to `23.02.3` it started to fail, and continued to fail with `23.05.1`
Author
Owner

@RHaest commented on GitHub (May 25, 2023):

@ssddanbrown do you have any updates on this issue or perhaps workarounds? Thanks!

@RHaest commented on GitHub (May 25, 2023): @ssddanbrown do you have any updates on this issue or perhaps workarounds? Thanks!
Author
Owner

@ssddanbrown commented on GitHub (May 25, 2023):

@RHaest No, nothing to provide back right now. Your scenario is quite specific with a lot of filesystem specific layers involved (Azure container platform, Docker, Volume mounts, Mounted file share) so is a little time consuming/hassle to replicate. I could guess that something in that chain of filesystem handling doesn't like the setting of permissions.

At this time I could only suggest a simpler/alternative hosting option.

@ssddanbrown commented on GitHub (May 25, 2023): @RHaest No, nothing to provide back right now. Your scenario is quite specific with a lot of filesystem specific layers involved (Azure container platform, Docker, Volume mounts, Mounted file share) so is a little time consuming/hassle to replicate. I could guess that something in that chain of filesystem handling doesn't like the setting of permissions. At this time I could only suggest a simpler/alternative hosting option.
Author
Owner

@ghost commented on GitHub (Jun 27, 2023):

@RHaest I am encountering the exact same problem. Have you been able to find a solution?

@ghost commented on GitHub (Jun 27, 2023): @RHaest I am encountering the exact same problem. Have you been able to find a solution?
Author
Owner

@RHaest commented on GitHub (Jul 3, 2023):

@tosnoah unfortunately not and I ended up using another solution since this was a blocker for me.

@RHaest commented on GitHub (Jul 3, 2023): @tosnoah unfortunately not and I ended up using another solution since this was a blocker for me.
Author
Owner

@ssddanbrown commented on GitHub (Sep 11, 2023):

I'll go ahead and close this off, since another solution is used instead.

@ssddanbrown commented on GitHub (Sep 11, 2023): I'll go ahead and close this off, since another solution is used instead.
Author
Owner

@nathanclayton commented on GitHub (Oct 20, 2023):

@RHaest I am encountering the exact same problem. Have you been able to find a solution?

I ended up having to set the S3 endpoint as if were using a 3rd party provider and it worked fine. My configmap (hosted on Kubernetes) looks like this for the environment variables (all S3 buckets are private account-wide, so all public access has to go through something like cloudfront):

  STORAGE_TYPE: s3
  STORAGE_S3_ENDPOINT: https://s3.us-west-2.amazonaws.com
  STORAGE_S3_KEY: xxxxxxx
  STORAGE_S3_SECRET: xxxxxxx
  STORAGE_S3_BUCKET:xxxxxx-bookstack
  STORAGE_S3_REGION: us-west-2
  STORAGE_URL: https://xxxxxxx.cloudfront.net
@nathanclayton commented on GitHub (Oct 20, 2023): > @RHaest I am encountering the exact same problem. Have you been able to find a solution? I ended up having to set the S3 endpoint as if were using a 3rd party provider and it worked fine. My configmap (hosted on Kubernetes) looks like this for the environment variables (all S3 buckets are private account-wide, so all public access has to go through something like cloudfront): ``` STORAGE_TYPE: s3 STORAGE_S3_ENDPOINT: https://s3.us-west-2.amazonaws.com STORAGE_S3_KEY: xxxxxxx STORAGE_S3_SECRET: xxxxxxx STORAGE_S3_BUCKET:xxxxxx-bookstack STORAGE_S3_REGION: us-west-2 STORAGE_URL: https://xxxxxxx.cloudfront.net ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#3786