fixing perms

This commit is contained in:
dekzter 2025-03-25 11:12:36 -04:00
parent 75f461b180
commit 306e4d1442
2 changed files with 7 additions and 10 deletions

View file

@ -18,4 +18,5 @@ else
fi
fi
usermod -aG www-data $POSTGRES_USER
# Run nginx as specified user
sed -i 's/user www-data;/user dispatch;/g' /etc/nginx/nginx.conf

View file

@ -1,19 +1,15 @@
#!/bin/bash
# Required so both uwsgi and nginx (www-data) can use it
# @TODO: change nginx to run as the same use as uwsgi
# NOTE: mac doesn't run as root, so only manage permissions
# if this script is running as root
if [ "$(id -u)" = "0" ]; then
touch /app/uwsgi.sock
chown -R $PUID:$PGID /app
chown $PUID:www-data /app/uwsgi.sock
chmod 777 /app/uwsgi.sock
chown $PUID:$PGID /app/uwsgi.sock
# Create and set permissions for the cached_m3u directory
mkdir -p /app/media/cached_m3u
chown -R $PUID:$PGID /app/media/cached_m3u
chmod 777 /app/media/cached_m3u
# Create and set permissions for the media / cache directories
mkdir -p /app/media
chown -R $PUID:$PGID /app
echo "Created and set permissions for cached_m3u directory"
fi