fix-permissions() { if [ "$(whoami)" != "root" ]; then echo "error: you must be root to fix permissions" echo "Try adding '--user root'" exit 1 fi if [ ! -d /app/uploads ]; then echo "error: no uploads dir!" echo "Make sure to run it on the 'app' service" exit 1 fi echo "Fixing upload permissions" echo "Making karrot the owner of uploads" chown -R karrot:karrot /app/uploads echo "Done" }