#!/bin/bash
# Run this on the cPanel server after unzip, from the Laravel root:
#   bash set-permissions.sh
set -e
cd "$(dirname "$0")"

find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
chmod 755 artisan set-permissions.sh
chmod -R 775 storage bootstrap/cache
find storage bootstrap/cache -type f -exec chmod 664 {} \;

echo "Permissions set: folders 755, files 644, storage and bootstrap/cache writable."
