From 036f3fb1d1655197baf45a513e4c7ee882fac781 Mon Sep 17 00:00:00 2001 From: Roger Gonzalez Date: Wed, 25 Oct 2023 23:06:22 -0300 Subject: Checking if the current user has enough permissions to install YAMS --- install.sh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'install.sh') diff --git a/install.sh b/install.sh index 802a395..0eef3cd 100644 --- a/install.sh +++ b/install.sh @@ -95,6 +95,10 @@ if [ ! -d "$install_directory" ]; then fi fi +if [ ! -w "$install_directory" ]; then + send_error_message "The directory \"$install_directory\" is not writtable by the current user. Set the correct permissions or try a different directory" ❌ +fi + filename="$install_directory/docker-compose.yaml" custom_file_filename="$install_directory/docker-compose.custom.yaml" env_file="$install_directory/.env" -- cgit v1.2.3 From 63bff4b94b086d77e26ebfb97e2a74085e593b14 Mon Sep 17 00:00:00 2001 From: Roger Gonzalez Date: Wed, 25 Oct 2023 23:15:40 -0300 Subject: Checking if the install directory is writtable and readable --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'install.sh') diff --git a/install.sh b/install.sh index 0eef3cd..8bf6514 100644 --- a/install.sh +++ b/install.sh @@ -95,8 +95,8 @@ if [ ! -d "$install_directory" ]; then fi fi -if [ ! -w "$install_directory" ]; then - send_error_message "The directory \"$install_directory\" is not writtable by the current user. Set the correct permissions or try a different directory" ❌ +if [ ! -w "$install_directory" ] || [ ! -r "$install_directory" ]; then + send_error_message "The directory \"$install_directory\" is not writable or readable by the current user. Set the correct permissions or try a different directory" ❌ fi filename="$install_directory/docker-compose.yaml" -- cgit v1.2.3