2 title = "Bookstack Permissions Setup"
3 description = "How to setup permissions to your Bookstack instance"
8 ## BookStack Permission Setup
10 This document provides an approach for setting permissions for your BookStack instance, which allows updating by the login user while providing the webserver with the required permissions.
12 The below makes the following assumptions, **you will need to change these parts** of the command to make it work for you:
14 - Your normal login user (That you may run updates with) is called `barry`.
15 - Your bookstack folder is located at `/var/www/bookstack`.
16 - Your webserver/php user called `www-data` (Default on Ubuntu systems).
18 Lines starting with `#` are comments.
21 # Set the bookstack folders and files to be owned by the user barry and have the group www-data
22 sudo chown -R barry:www-data /var/www/bookstack
24 # Set all bookstack files and folders to be readable, writeable & executable by the user (barry) and
25 # readable & executable by the group and everyone else
26 sudo chmod -R 755 /var/www/bookstack
28 # For the listed directories, grant the group (www-data) write-access
29 sudo chmod -R 775 /var/www/bookstack/storage /var/www/bookstack/bootstrap/cache /var/www/bookstack/public/uploads
31 # Limit the .env file to only be readable by the user and group, and only writable by the user.
32 sudo chmod -R 640 /var/www/bookstack/.env