Assign the correct permissions to the pem file when importing it (ks-upv/upa/upf/upr)

This commit is contained in:
q3aql 2023-03-12 15:01:04 +01:00
parent 147753c1a0
commit 906cb000d9
4 changed files with 8 additions and 0 deletions

View File

@ -563,6 +563,7 @@ function editConfig() {
encrypt_password_enter=$(encrypt_kstools "${raw_password_enter}")
echo ${encrypt_password_enter} > ${dirConfig}/ks-upload-pass
cp -rf "${pem_path}" ${dirConfig}/connect.pem
chmod 600 ${dirConfig}/connect.pem
echo "* PEM file copied to ${dirConfig}/connect.pem"
else
echo "+ File ${pem_path} does not exist"
@ -667,6 +668,7 @@ function createConfig() {
encrypt_password_enter=$(encrypt_kstools "${raw_password_enter}")
echo ${encrypt_password_enter} > ${dirConfig}/ks-upload-pass
cp -rf "${pem_path}" ${dirConfig}/connect.pem
chmod 600 ${dirConfig}/connect.pem
echo "* PEM file copied to ${dirConfig}/connect.pem"
else
echo "+ File ${pem_path} does not exist"

View File

@ -590,6 +590,7 @@ function editConfig() {
encrypt_password_enter=$(encrypt_kstools "${raw_password_enter}")
echo ${encrypt_password_enter} > ${dirConfig}/ks-upload-pass
cp -rf "${pem_path}" ${dirConfig}/connect.pem
chmod 600 ${dirConfig}/connect.pem
echo "* PEM file copied to ${dirConfig}/connect.pem"
else
echo "+ File ${pem_path} does not exist"
@ -694,6 +695,7 @@ function createConfig() {
encrypt_password_enter=$(encrypt_kstools "${raw_password_enter}")
echo ${encrypt_password_enter} > ${dirConfig}/ks-upload-pass
cp -rf "${pem_path}" ${dirConfig}/connect.pem
chmod 600 ${dirConfig}/connect.pem
echo "* PEM file copied to ${dirConfig}/connect.pem"
else
echo "+ File ${pem_path} does not exist"

View File

@ -449,6 +449,7 @@ function editConfig() {
encrypt_password_enter=$(encrypt_kstools "${raw_password_enter}")
echo ${encrypt_password_enter} > ${dirConfig}/ks-upload-pass
cp -rf "${pem_path}" ${dirConfig}/connect.pem
chmod 600 ${dirConfig}/connect.pem
echo "* PEM file copied to ${dirConfig}/connect.pem"
else
echo "+ File ${pem_path} does not exist"
@ -553,6 +554,7 @@ function createConfig() {
encrypt_password_enter=$(encrypt_kstools "${raw_password_enter}")
echo ${encrypt_password_enter} > ${dirConfig}/ks-upload-pass
cp -rf "${pem_path}" ${dirConfig}/connect.pem
chmod 600 ${dirConfig}/connect.pem
echo "* PEM file copied to ${dirConfig}/connect.pem"
else
echo "+ File ${pem_path} does not exist"

View File

@ -563,6 +563,7 @@ function editConfig() {
encrypt_password_enter=$(encrypt_kstools "${raw_password_enter}")
echo ${encrypt_password_enter} > ${dirConfig}/ks-upload-pass
cp -rf "${pem_path}" ${dirConfig}/connect.pem
chmod 600 ${dirConfig}/connect.pem
echo "* PEM file copied to ${dirConfig}/connect.pem"
else
echo "+ File ${pem_path} does not exist"
@ -667,6 +668,7 @@ function createConfig() {
encrypt_password_enter=$(encrypt_kstools "${raw_password_enter}")
echo ${encrypt_password_enter} > ${dirConfig}/ks-upload-pass
cp -rf "${pem_path}" ${dirConfig}/connect.pem
chmod 600 ${dirConfig}/connect.pem
echo "* PEM file copied to ${dirConfig}/connect.pem"
else
echo "+ File ${pem_path} does not exist"