File path /uploads/images//technology.png could not be uploaded to. Ensure it is writable to the server. #3781

Closed
opened 2026-02-05 07:27:21 +03:00 by OVERLORD · 11 comments
Owner

Originally created by @magicman32 on GitHub (May 6, 2023).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

Editing a shelf to add an image as a cover

File path /uploads/images//technology.png could not be uploaded to. Ensure it is writable to the server.
when I click save shelf I get above error

my original bookstack I entered a command for file permissions, but I cant find the note with command
I am running bookstack in a proxmox lxc and installed via portainter stack

Exact BookStack Version

v23.05

Log Content

Details

[custom-init] No custom files found, skipping...
[ls.io-init] done.
[migrations] started
[migrations] 01-nginx-site-confs-default: skipped
[migrations] 02-default-location: skipped
[migrations] done
usermod: no changes
───────────────────────────────────────
      ██╗     ███████╗██╗ ██████╗ 
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝ 
   Brought to you by linuxserver.io
───────────────────────────────────────
To support LSIO projects visit:
https://www.linuxserver.io/donate/
───────────────────────────────────────
GID/UID
───────────────────────────────────────
User UID:    1000
User GID:    1000
───────────────────────────────────────
using keys found in /config/keys
App Key found - setting variable for seds
Running config - DB_HOST set
Waiting for DB to be available
   INFO  Nothing to migrate.  
**** The following active confs have different version dates than the samples that are shipped. ****
**** This may be due to user customization or an update to the samples. ****
**** You should compare the following files to the samples in the same folder and update them. ****
**** Use the link at the top of the file to view the changelog. ****
┌────────────┬────────────┬────────────────────────────────────────────────────────────────────────┐
│  old date  │  new date  │ path                                                                   │
├────────────┼────────────┼────────────────────────────────────────────────────────────────────────┤
│ 2018-03-06 │ 2023-04-13 │ /config/nginx/site-confs/default.conf                                  │
│            │ 2023-04-13 │ /config/nginx/nginx.conf                                               │
└────────────┴────────────┴────────────────────────────────────────────────────────────────────────┘
[custom-init] No custom files found, skipping...
[ls.io-init] done.

PHP Version

No response

Hosting Environment

I am running bookstack in a proxmox lxc and installed via portainter stack
lxc is running Ubuntu 22.04.2 LTS (GNU/Linux 6.1.15-1-pve x86_64)

Originally created by @magicman32 on GitHub (May 6, 2023). ### Attempted Debugging - [X] I have read the debugging page ### Searched GitHub Issues - [X] I have searched GitHub for the issue. ### Describe the Scenario Editing a shelf to add an image as a cover File path /uploads/images//technology.png could not be uploaded to. Ensure it is writable to the server. when I click save shelf I get above error my original bookstack I entered a command for file permissions, but I cant find the note with command I am running bookstack in a proxmox lxc and installed via portainter stack ### Exact BookStack Version v23.05 ### Log Content <details><summary>Details</summary> <p> ``` [custom-init] No custom files found, skipping... [ls.io-init] done. [migrations] started [migrations] 01-nginx-site-confs-default: skipped [migrations] 02-default-location: skipped [migrations] done usermod: no changes ─────────────────────────────────────── ██╗ ███████╗██╗ ██████╗ ██║ ██╔════╝██║██╔═══██╗ ██║ ███████╗██║██║ ██║ ██║ ╚════██║██║██║ ██║ ███████╗███████║██║╚██████╔╝ ╚══════╝╚══════╝╚═╝ ╚═════╝ Brought to you by linuxserver.io ─────────────────────────────────────── To support LSIO projects visit: https://www.linuxserver.io/donate/ ─────────────────────────────────────── GID/UID ─────────────────────────────────────── User UID: 1000 User GID: 1000 ─────────────────────────────────────── using keys found in /config/keys App Key found - setting variable for seds Running config - DB_HOST set Waiting for DB to be available INFO Nothing to migrate. **** The following active confs have different version dates than the samples that are shipped. **** **** This may be due to user customization or an update to the samples. **** **** You should compare the following files to the samples in the same folder and update them. **** **** Use the link at the top of the file to view the changelog. **** ┌────────────┬────────────┬────────────────────────────────────────────────────────────────────────┐ │ old date │ new date │ path │ ├────────────┼────────────┼────────────────────────────────────────────────────────────────────────┤ │ 2018-03-06 │ 2023-04-13 │ /config/nginx/site-confs/default.conf │ │ │ 2023-04-13 │ /config/nginx/nginx.conf │ └────────────┴────────────┴────────────────────────────────────────────────────────────────────────┘ [custom-init] No custom files found, skipping... [ls.io-init] done. ``` </p> </details> ### PHP Version _No response_ ### Hosting Environment I am running bookstack in a proxmox lxc and installed via portainter stack lxc is running Ubuntu 22.04.2 LTS (GNU/Linux 6.1.15-1-pve x86_64)
OVERLORD added the 🐕 Support label 2026-02-05 07:27:21 +03:00
Author
Owner

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

Hi @magicman32,
From about 7:28 in this video I talk about logs files that are provided with the linuxserver container:
https://youtu.be/6A8hLuQTkKQ?t=448
Can you check both the webserver log and bookstack error log, at mentioned in the video, for errors around the same time, just to see if we can confirm this is indeed a permissions issue.

@ssddanbrown commented on GitHub (May 6, 2023): Hi @magicman32, From about 7:28 in this video I talk about logs files that are provided with the linuxserver container: https://youtu.be/6A8hLuQTkKQ?t=448 Can you check both the webserver log and bookstack error log, at mentioned in the video, for errors around the same time, just to see if we can confirm this is indeed a permissions issue.
Author
Owner

@magicman32 commented on GitHub (May 7, 2023):

2023-05-06 14:34:53] production.ERROR: Error when attempting image upload:Unable to create a directory at /app/www/public/uploads/images/cover_bookshelf/2023-05.
[2023-05-06 14:34:53] production.ERROR: File path /uploads/images/cover_bookshelf/2023-05/technology.png could not be uploaded to. Ensure it is writable to the server. {"userId":1,"exception":"[object] (BookStack\Exceptions\ImageUploadException(code: 0): File path /uploads/images/cover_bookshelf/2023-05/technology.png could not be uploaded to. Ensure it is writable to the server. at /app/www/app/Uploads/ImageService.php:174)
[stacktrace]

@magicman32 commented on GitHub (May 7, 2023): 2023-05-06 14:34:53] production.ERROR: Error when attempting image upload:Unable to create a directory at /app/www/public/uploads/images/cover_bookshelf/2023-05. [2023-05-06 14:34:53] production.ERROR: File path /uploads/images/cover_bookshelf/2023-05/technology.png could not be uploaded to. Ensure it is writable to the server. {"userId":1,"exception":"[object] (BookStack\\Exceptions\\ImageUploadException(code: 0): File path /uploads/images/cover_bookshelf/2023-05/technology.png could not be uploaded to. Ensure it is writable to the server. at /app/www/app/Uploads/ImageService.php:174) [stacktrace]
Author
Owner

@magicman32 commented on GitHub (May 7, 2023):

sudo chown -R www-data:www-data /var/www/bookstack/storage /var/www/bookstack/public/uploads /var/www/bookstack/bootstrap/cache

also found this.......but my bookstack instance doesnt have anything in /var directory

@magicman32 commented on GitHub (May 7, 2023): sudo chown -R www-data:www-data /var/www/bookstack/storage /var/www/bookstack/public/uploads /var/www/bookstack/bootstrap/cache also found this.......but my bookstack instance doesnt have anything in /var directory
Author
Owner

@magicman32 commented on GitHub (May 7, 2023):

I have now installed via install script onto proxmox lxc instead of docker, I can now upload images for book covers etc......but cant upload images on upload an image page

but I cant find where log file is in this version

@magicman32 commented on GitHub (May 7, 2023): I have now installed via install script onto proxmox lxc instead of docker, I can now upload images for book covers etc......but cant upload images on upload an image page but I cant find where log file is in this version
Author
Owner

@magicman32 commented on GitHub (May 7, 2023):

sorry found log folder...but no logs

@magicman32 commented on GitHub (May 7, 2023): sorry found log folder...but no logs
Author
Owner

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

@magicman32 Do you see any specific messages on the screen when uploading a book cover (Might need to expand the cover image form area again)? Does it work if you use an image with a very small file size?

@ssddanbrown commented on GitHub (May 7, 2023): @magicman32 Do you see any specific messages on the screen when uploading a book cover (Might need to expand the cover image form area again)? Does it work if you use an image with a very small file size?
Author
Owner

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

covers are now fine for shelves and books.....but inside a page I cant add an image.....

@magicman32 commented on GitHub (May 8, 2023): covers are now fine for shelves and books.....but inside a page I cant add an image.....
Author
Owner

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

Craigs Personal WikiPage - Uploading image error

@magicman32 commented on GitHub (May 8, 2023): ![Craigs Personal WikiPage - Uploading image error](https://user-images.githubusercontent.com/15340872/236833329-d02aeabd-62bd-4a68-b236-1ada4bfa9749.png)
Author
Owner

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

@magicman32 Does the APP_URL, in the /var/www/bookstack/.env file exactly match the base BookStack URL used in the browser? Including starting http:// or https:// part?

@ssddanbrown commented on GitHub (May 8, 2023): @magicman32 Does the `APP_URL`, in the `/var/www/bookstack/.env` file exactly match the base BookStack URL used in the browser? Including starting `http://` or `https://` part?
Author
Owner

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

thank you, it was set to http but I access via cloudflare tunnels https

it worked, thank you for your help, awesome app btw

@magicman32 commented on GitHub (May 8, 2023): thank you, it was set to http but I access via cloudflare tunnels https it worked, thank you for your help, awesome app btw
Author
Owner

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

Awesome, happy to hear that solved it. Will therefore close this off.

@ssddanbrown commented on GitHub (May 8, 2023): Awesome, happy to hear that solved it. Will therefore close this off.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#3781