ERROR: Error when attempting image upload:chmod(): Operation not permitted #3525

Closed
opened 2026-02-05 06:59:40 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @jmleandrocr on GitHub (Feb 21, 2023).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

I tried to upload images, but it doesn't work. I reviewed the directory and the images exists, but the system show that and error was raised.

Exact BookStack Version

BookStack v23.01.1

Log Content

#8 /app/www/vendor/laravel/framework/src/Illuminate/Routing/ResponseFactory.php(85): Illuminate\\Routing\\ResponseFactory->make()
#9 /app/www/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(585): Illuminate\\Routing\\ResponseFactory->view()
#10 /app/www/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(490): Illuminate\\Foundation\\Exceptions\\Handler->renderHttpException()
#11 /app/www/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(356): Illuminate\\Foundation\\Exceptions\\Handler->prepareResponse()
#12 /app/www/app/Exceptions/Handler.php(66): Illuminate\\Foundation\\Exceptions\\Handler->render()
#13 /app/www/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(196): BookStack\\Exceptions\\Handler->render()
#14 /app/www/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(173): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->renderHttpResponse()
#15 [internal function]: Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleException()
#16 {main}
  thrown at /app/www/storage/framework/views/872733693c1f8e7d46945825e715cc42e8efb276.php:68)
[stacktrace]
#0 {main}
"} 
[2023-02-21 17:09:46] production.ERROR: Error when attempting image upload:chmod(): Operation not permitted  
[2023-02-21 17:10:08] production.ERROR: Error when attempting image upload:chmod(): Operation not permitted  
[2023-02-21 17:19:18] production.ERROR: Error when attempting image upload:chmod(): Operation not permitted  
[2023-02-21 17:53:26] production.ERROR: Error when attempting image upload:chmod(): Operation not permitted  
[2023-02-21 17:54:17] production.ERROR: Error when attempting image upload:chmod(): Operation not permitted  

PHP Version

No response

Hosting Environment

docker image linuxserver/bookstack
on
Icon name: computer-vm
Chassis: vm
Virtualization: kvm
Operating System: Oracle Linux Server 7.9
CPE OS Name: cpe:/o:oracle:linux:7:9:server
Kernel: Linux 5.4.17-2136.301.1.2.el7uek.x86_64
Architecture: x86-64

Originally created by @jmleandrocr on GitHub (Feb 21, 2023). ### Attempted Debugging - [X] I have read the debugging page ### Searched GitHub Issues - [X] I have searched GitHub for the issue. ### Describe the Scenario I tried to upload images, but it doesn't work. I reviewed the directory and the images exists, but the system show that and error was raised. ### Exact BookStack Version BookStack v23.01.1 ### Log Content ``` #8 /app/www/vendor/laravel/framework/src/Illuminate/Routing/ResponseFactory.php(85): Illuminate\\Routing\\ResponseFactory->make() #9 /app/www/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(585): Illuminate\\Routing\\ResponseFactory->view() #10 /app/www/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(490): Illuminate\\Foundation\\Exceptions\\Handler->renderHttpException() #11 /app/www/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(356): Illuminate\\Foundation\\Exceptions\\Handler->prepareResponse() #12 /app/www/app/Exceptions/Handler.php(66): Illuminate\\Foundation\\Exceptions\\Handler->render() #13 /app/www/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(196): BookStack\\Exceptions\\Handler->render() #14 /app/www/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(173): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->renderHttpResponse() #15 [internal function]: Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleException() #16 {main} thrown at /app/www/storage/framework/views/872733693c1f8e7d46945825e715cc42e8efb276.php:68) [stacktrace] #0 {main} "} [2023-02-21 17:09:46] production.ERROR: Error when attempting image upload:chmod(): Operation not permitted [2023-02-21 17:10:08] production.ERROR: Error when attempting image upload:chmod(): Operation not permitted [2023-02-21 17:19:18] production.ERROR: Error when attempting image upload:chmod(): Operation not permitted [2023-02-21 17:53:26] production.ERROR: Error when attempting image upload:chmod(): Operation not permitted [2023-02-21 17:54:17] production.ERROR: Error when attempting image upload:chmod(): Operation not permitted ``` ### PHP Version _No response_ ### Hosting Environment docker image [linuxserver/bookstack](https://github.com/linuxserver/docker-bookstack) on Icon name: computer-vm Chassis: vm Virtualization: kvm Operating System: Oracle Linux Server 7.9 CPE OS Name: cpe:/o:oracle:linux:7:9:server Kernel: Linux 5.4.17-2136.301.1.2.el7uek.x86_64 Architecture: x86-64
OVERLORD added the 🐕 Support label 2026-02-05 06:59:40 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Feb 22, 2023):

Hi @mleandroj18,
I'm guessing there's a file permissions issues at play here. Could be permissions on the files or parent folders, or possibly SELinux if enabled in your environment. Is SELinux enabled in this environment?

@ssddanbrown commented on GitHub (Feb 22, 2023): Hi @mleandroj18, I'm guessing there's a file permissions issues at play here. Could be permissions on the files or parent folders, or possibly SELinux if enabled in your environment. Is SELinux enabled in this environment?
Author
Owner

@jmleandrocr commented on GitHub (Feb 22, 2023):

Hi ssddanbrown

Yes, it's enabled in the host.

image

@jmleandrocr commented on GitHub (Feb 22, 2023): Hi [ssddanbrown](https://github.com/ssddanbrown) Yes, it's enabled in the host. ![image](https://user-images.githubusercontent.com/23279507/220666132-41421d0b-272f-4fab-bed0-01f11789924c.png)
Author
Owner

@jmleandrocr commented on GitHub (Feb 22, 2023):

I resolved the issue, it's a permission issue.

To solved it:

Use a named volume: Instead of mounting a volume from the host, you can create a named volume using the docker volume create command. Named volumes are managed by Docker and should not have file permission issues.

Regards.

@jmleandrocr commented on GitHub (Feb 22, 2023): I resolved the issue, it's a permission issue. To solved it: Use a named volume: Instead of mounting a volume from the host, you can create a named volume using the docker volume create command. Named volumes are managed by Docker and should not have file permission issues. Regards.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#3525