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