RunTime Exception trying to update 0.30.5 to 22.02.3 #2700

Closed
opened 2026-02-05 04:51:09 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @jlynnes on GitHub (Mar 10, 2022).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

Runtime Exception Trying to update from Bookstack 0.30.5 to 22.02.3

[RuntimeException]
/var/www/bookstack/vendor/dasprid does not exist and could not be created.

errorscreenshot

Exact BookStack Version

22.02.3

Log Content

[RuntimeException]
/var/www/bookstack/vendor/dasprid does not exist and could not be created.

PHP Version

7.4.3

Hosting Environment

Using a VPS

Installed on fresh using ubuntu 20.04 using 20.04 install script

Linux bookstack 5.4.0-104-generic #118-Ubuntu SMP Wed Mar 2 19:02:41 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Originally created by @jlynnes on GitHub (Mar 10, 2022). ### Attempted Debugging - [X] I have read the debugging page ### Searched GitHub Issues - [X] I have searched GitHub for the issue. ### Describe the Scenario Runtime Exception Trying to update from Bookstack 0.30.5 to 22.02.3 [RuntimeException] /var/www/bookstack/vendor/dasprid does not exist and could not be created. ![errorscreenshot](https://user-images.githubusercontent.com/59293737/157536593-ca2a4e2c-0702-4f9b-a37a-a31703828b08.png) ### Exact BookStack Version 22.02.3 ### Log Content [RuntimeException] /var/www/bookstack/vendor/dasprid does not exist and could not be created. ### PHP Version 7.4.3 ### Hosting Environment Using a VPS Installed on fresh using ubuntu 20.04 using 20.04 install script Linux bookstack 5.4.0-104-generic #118-Ubuntu SMP Wed Mar 2 19:02:41 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
OVERLORD added the 🐕 Support label 2026-02-05 04:51:09 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Mar 10, 2022):

Hi @jlynnes,
This simply appears to be a permissions issue.

Your Ubuntu user does not have permission to run the composer install --no-dev command. You're running the update line with sudo but sudo would only apply to the first of the three commands.

You could add sudo to the composer command but this will prompt a warning regarding security.


As an alternative you could change file/folder permissions to be accessible to your ubuntu user:

Ideally backup first and be real careful running these.

# Navigate to BookStack directory
cd /var/www/bookstack

# Set default files owner to be your `ubuntu` user. 
sudo chown -R ubuntu:ubuntu ./

# Update folders that need to be server-writable
sudo chown -R ubuntu:www-data ./storage/ ./public/uploads/ ./bootstrap/cache/

# Update permissions to be user and group read-write
sudo chmod -R 775 ./

# Tell git to ignore any permission changes
git config core.fileMode false

After that you should be able to run update commands without sudo at all.

@ssddanbrown commented on GitHub (Mar 10, 2022): Hi @jlynnes, This simply appears to be a permissions issue. Your Ubuntu user does not have permission to run the `composer install --no-dev` command. You're running the update line with `sudo` but `sudo` would only apply to the first of the three commands. You could add `sudo` to the composer command but this will prompt a warning regarding security. --- As an alternative you could change file/folder permissions to be accessible to your ubuntu user: Ideally backup first and be real careful running these. ``` # Navigate to BookStack directory cd /var/www/bookstack # Set default files owner to be your `ubuntu` user. sudo chown -R ubuntu:ubuntu ./ # Update folders that need to be server-writable sudo chown -R ubuntu:www-data ./storage/ ./public/uploads/ ./bootstrap/cache/ # Update permissions to be user and group read-write sudo chmod -R 775 ./ # Tell git to ignore any permission changes git config core.fileMode false ``` After that you should be able to run update commands without `sudo` at all.
Author
Owner

@jlynnes commented on GitHub (Mar 10, 2022):

That worked, THANK YOU!

@jlynnes commented on GitHub (Mar 10, 2022): That worked, THANK YOU!
Author
Owner

@ssddanbrown commented on GitHub (Mar 10, 2022):

Happy to hear! And thank you very much for the sponsorship!

@ssddanbrown commented on GitHub (Mar 10, 2022): Happy to hear! And thank you very much for the sponsorship!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2700