Updated permissions

This commit is contained in:
Kevin Veen-Birkenbach 2020-04-29 23:33:37 +02:00
parent ae60d9ae75
commit 4978f6c54e
2 changed files with 17 additions and 3 deletions

View File

@ -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:

View File

@ -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