#!/bin/bash
set -e

# Writable upload directories for student photos
find /var/www/html -type d -name upload -exec chown -R www-data:www-data {} + 2>/dev/null || true
find /var/www/html -type d -name upload -exec chmod -R 775 {} + 2>/dev/null || true

exec "$@"
