Set proper directory permissions for data dir

Linux directory permissions 777 is extremely insecure and never necessary.
This commit is contained in:
Ashley 2021-03-29 20:06:01 -04:00 committed by TNE
parent 8d17c41d16
commit 0a42c0b74c

View File

@ -8,11 +8,11 @@ if ! [ -d "$DATA_PATH" ]; then
echo "Creating cathook data directory at $DATA_PATH"
mkdir -p "$DATA_PATH"
chown -R $user "$DATA_PATH"
chmod -R 777 "$DATA_PATH"
chmod -R 774 "$DATA_PATH"
fi
echo "Installing cathook data to $DATA_PATH"
rsync -avh "data/" "$DATA_PATH"
rsync -avh --ignore-existing "config_data/" "$DATA_PATH"
chown -R $user "$DATA_PATH"
chmod -R 777 "$DATA_PATH"
chmod -R 774 "$DATA_PATH"