Permissions on root gpg keyring

This commit is contained in:
Bob Mottram 2017-06-23 11:12:28 +01:00
parent 4305bb71d1
commit 2a5038d209
4 changed files with 12 additions and 0 deletions

View File

@ -1629,6 +1629,8 @@ function configure_gpg {
if [ ! -d /root/.gnupg ]; then
cp -r /home/$MY_USERNAME/.gnupg /root/
chmod 700 /root/.gnupg
chmod 600 /root/.gnupg/*
fi
gpg_agent_setup root
gpg_agent_setup $MY_USERNAME

View File

@ -108,6 +108,8 @@ function check_admin_user {
function copy_gpg_keys {
echo $"Copying GPG keys from admin user to root"
cp -r /home/$ADMIN_USERNAME/.gnupg /root
chmod 700 /root/.gnupg
chmod 600 /root/.gnupg/*
}
function restore_configfiles {
@ -340,6 +342,8 @@ function restore_gpg {
backup_unmount_drive
exit 283
fi
chmod 700 /root/.gnupg
chmod 600 /root/.gnupg/*
fi
fi
done

View File

@ -99,6 +99,8 @@ DATABASE_PASSWORD=$(${PROJECT_NAME}-pass -u root -a mariadb)
function copy_gpg_keys {
echo $"Copying GPG keys from admin user to root"
cp -r /home/$ADMIN_USERNAME/.gnupg /root
chmod 700 /root/.gnupg
chmod 600 /root/.gnupg/*
}
function restore_configfiles {
@ -306,6 +308,8 @@ function restore_gpg {
if [ ! "$?" = "0" ]; then
exit 283
fi
chmod 700 /root/.gnupg
chmod 600 /root/.gnupg/*
fi
fi
fi

View File

@ -240,6 +240,8 @@ function interactive_key_recovery {
${PROJECT_NAME}-recoverkey -u $MY_USERNAME
if [ -d /home/$MY_USERNAME/.gnupg ]; then
cp -rf /home/$MY_USERNAME/.gnupg /root
chmod 700 /root/.gnupg
chmod 600 /root/.gnupg/*
fi
}