mirror of
https://gitlab.alpinelinux.org/alpine/cloud/tiny-cloud.git
synced 2026-02-04 04:22:43 +03:00
.. .. ..
This commit is contained in:
parent
b299b7f4b9
commit
6e16b2a614
@ -25,7 +25,7 @@ init__set_ssh_keys() {
|
|||||||
tmp_file="$tmp_dir/$user"
|
tmp_file="$tmp_dir/$user"
|
||||||
touch "$tmp_file"
|
touch "$tmp_file"
|
||||||
chmod 600 "$tmp_file"
|
chmod 600 "$tmp_file"
|
||||||
$MOCK chown -R "$user/$group" "$tmp_file"
|
$MOCK chown -R "$user:$group" "$tmp_file"
|
||||||
echo "$key" >> "$tmp_file"
|
echo "$key" >> "$tmp_file"
|
||||||
done
|
done
|
||||||
local ssh_dir
|
local ssh_dir
|
||||||
@ -36,7 +36,7 @@ init__set_ssh_keys() {
|
|||||||
ssh_dir="$ROOT$(echo "$pwent" | cut -d: -f6)/.ssh"
|
ssh_dir="$ROOT$(echo "$pwent" | cut -d: -f6)/.ssh"
|
||||||
if [ ! -d "$ssh_dir" ]; then
|
if [ ! -d "$ssh_dir" ]; then
|
||||||
mkdir -p "$ssh_dir"
|
mkdir -p "$ssh_dir"
|
||||||
$MOCK chown -R "$user/$group" "$ssh_dir"
|
$MOCK chown -R "$user:$group" "$ssh_dir"
|
||||||
chmod 700 "$ssh_dir"
|
chmod 700 "$ssh_dir"
|
||||||
fi
|
fi
|
||||||
cp -a "$tmp_file" "$ssh_dir/authorized_keys"
|
cp -a "$tmp_file" "$ssh_dir/authorized_keys"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user