fix(testbed/cron): chown :nasp

This commit is contained in:
Dict Xiong 2024-05-29 19:32:18 +08:00
parent 585b8ad82a
commit e75179eb57

View File

@ -22,7 +22,7 @@ touch_user() {
su - $1 -c "true"
mkdir -p /home2/$1
chown $1: /home2/$1
chown $1:nasp /home2/$1
}
update_key() {
@ -37,12 +37,12 @@ update_key() {
if [[ ! -d "$dest_dir" ]]; then
mkdir -p "$dest_dir"
chown $1:$1 "$dest_dir"
chown $1:nasp "$dest_dir"
chmod 700 "$dest_dir"
fi
cat "$tmp_path" > "$dest_path"
rm "$tmp_path"
chown $1:$1 "$dest_path"
chown $1:nasp "$dest_path"
chmod 600 "$dest_path"
}