From 4978f6c54e13d14d5f3f8b6bab33d22aa97a4de4 Mon Sep 17 00:00:00 2001 From: "Kevin Veen-Birkenbach [aka. Frantz]" Date: Wed, 29 Apr 2020 23:33:37 +0200 Subject: [PATCH] Updated permissions --- README.md | 17 +++++++++++++++-- sd_setup.sh | 3 ++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b278f0e..ec78a15 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,14 @@ This repository contains some shell scripts to install Arch Linux for the Raspberry Pi on a SD-Card and to backup a SD-Card. ## Setup -### Guided +### SD-Card +#### Guided To install a Linux distribution manually on a SD card type in: ```bash bash ./sd_setup.sh ``` -### Piped +#### Piped To pase the configuration to the program use this syntax: ```bash ( @@ -21,6 +22,18 @@ To pase the configuration to the program use this syntax: echo "y" #Copy wifi configurations to target system )| sudo bash ./sd_setup.sh ``` + +### System +#### Arch +```bash + pacman-key --init + pacman-key --populate archlinuxarm +``` +#### Ubuntu\\Debian +```bash + sudo apt update + sudo apt upgrade +``` ## Backup To backup a SD card type in: diff --git a/sd_setup.sh b/sd_setup.sh index 012a21d..235fbe3 100644 --- a/sd_setup.sh +++ b/sd_setup.sh @@ -247,7 +247,8 @@ if [ -f "$origin_user_rsa_pub" ] target_authorized_keys_content=$(cat "$target_authorized_keys") echo "$target_authorized_keys contains the following: $target_authorized_keys_content" chown -vR 1000 "$target_user_ssh_folder_path" - chmod -vR 400 "$target_user_ssh_folder_path" + chmod -v 700 "$target_user_ssh_folder_path" + chmod -v 600 "$target_authorized_keys" else echo "The ssh key \"$origin_user_rsa_pub\" can't be copied to \"$target_authorized_keys\" because it doesn't exist." fi