Permissions on root gpg keyring
This commit is contained in:
parent
4305bb71d1
commit
2a5038d209
|
@ -1629,6 +1629,8 @@ function configure_gpg {
|
||||||
|
|
||||||
if [ ! -d /root/.gnupg ]; then
|
if [ ! -d /root/.gnupg ]; then
|
||||||
cp -r /home/$MY_USERNAME/.gnupg /root/
|
cp -r /home/$MY_USERNAME/.gnupg /root/
|
||||||
|
chmod 700 /root/.gnupg
|
||||||
|
chmod 600 /root/.gnupg/*
|
||||||
fi
|
fi
|
||||||
gpg_agent_setup root
|
gpg_agent_setup root
|
||||||
gpg_agent_setup $MY_USERNAME
|
gpg_agent_setup $MY_USERNAME
|
||||||
|
|
|
@ -108,6 +108,8 @@ function check_admin_user {
|
||||||
function copy_gpg_keys {
|
function copy_gpg_keys {
|
||||||
echo $"Copying GPG keys from admin user to root"
|
echo $"Copying GPG keys from admin user to root"
|
||||||
cp -r /home/$ADMIN_USERNAME/.gnupg /root
|
cp -r /home/$ADMIN_USERNAME/.gnupg /root
|
||||||
|
chmod 700 /root/.gnupg
|
||||||
|
chmod 600 /root/.gnupg/*
|
||||||
}
|
}
|
||||||
|
|
||||||
function restore_configfiles {
|
function restore_configfiles {
|
||||||
|
@ -340,6 +342,8 @@ function restore_gpg {
|
||||||
backup_unmount_drive
|
backup_unmount_drive
|
||||||
exit 283
|
exit 283
|
||||||
fi
|
fi
|
||||||
|
chmod 700 /root/.gnupg
|
||||||
|
chmod 600 /root/.gnupg/*
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
|
@ -99,6 +99,8 @@ DATABASE_PASSWORD=$(${PROJECT_NAME}-pass -u root -a mariadb)
|
||||||
function copy_gpg_keys {
|
function copy_gpg_keys {
|
||||||
echo $"Copying GPG keys from admin user to root"
|
echo $"Copying GPG keys from admin user to root"
|
||||||
cp -r /home/$ADMIN_USERNAME/.gnupg /root
|
cp -r /home/$ADMIN_USERNAME/.gnupg /root
|
||||||
|
chmod 700 /root/.gnupg
|
||||||
|
chmod 600 /root/.gnupg/*
|
||||||
}
|
}
|
||||||
|
|
||||||
function restore_configfiles {
|
function restore_configfiles {
|
||||||
|
@ -306,6 +308,8 @@ function restore_gpg {
|
||||||
if [ ! "$?" = "0" ]; then
|
if [ ! "$?" = "0" ]; then
|
||||||
exit 283
|
exit 283
|
||||||
fi
|
fi
|
||||||
|
chmod 700 /root/.gnupg
|
||||||
|
chmod 600 /root/.gnupg/*
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -240,6 +240,8 @@ function interactive_key_recovery {
|
||||||
${PROJECT_NAME}-recoverkey -u $MY_USERNAME
|
${PROJECT_NAME}-recoverkey -u $MY_USERNAME
|
||||||
if [ -d /home/$MY_USERNAME/.gnupg ]; then
|
if [ -d /home/$MY_USERNAME/.gnupg ]; then
|
||||||
cp -rf /home/$MY_USERNAME/.gnupg /root
|
cp -rf /home/$MY_USERNAME/.gnupg /root
|
||||||
|
chmod 700 /root/.gnupg
|
||||||
|
chmod 600 /root/.gnupg/*
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue