Ensure permissions before gpg key deletion
This commit is contained in:
parent
c85ddcb63d
commit
98d4179784
|
@ -118,6 +118,7 @@ function gpg_delete_key {
|
||||||
key_username=$1
|
key_username=$1
|
||||||
key_id=$2
|
key_id=$2
|
||||||
|
|
||||||
|
chown -R $key_username:$key_username /home/$key_username/.gnupg
|
||||||
su -c "gpg --batch --quiet --homedir=/home/$key_username/.gnupg --delete-secret-key $key_id" - $key_username
|
su -c "gpg --batch --quiet --homedir=/home/$key_username/.gnupg --delete-secret-key $key_id" - $key_username
|
||||||
su -c "gpg --batch --quiet --homedir=/home/$key_username/.gnupg --delete-key $key_id" - $key_username
|
su -c "gpg --batch --quiet --homedir=/home/$key_username/.gnupg --delete-key $key_id" - $key_username
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue