#!/usr/bin/env bash
# If Laravel cannot write to the "storage" directory, run this script to fix permissions.

# The user that PHP will be running under.
# On Debian/Ubuntu, this is "www-data".
USER='www-data'

# Switch to project directory.
cd $( dirname "$0" )

sudo chown -R "$USER:$USER" storage
sudo chmod -R guo+w bootstrap/cache
sudo chmod -R gu+w storage
sudo chmod -R guo+w storage
