Add permission fixing cmd
Since we run karrot as karrot user now, the uploads need to be owned by that user.
This commit is contained in:
parent
83e1c78b6a
commit
1f46da81a0
18
abra.sh
18
abra.sh
|
@ -1,2 +1,16 @@
|
||||||
export NGINX_CONFIG_VERSION=v23
|
fix-permissions() {
|
||||||
export GEOIP_CONFIG_VERSION=v1
|
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"
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue