More permissions setting before gpg user commands
This commit is contained in:
parent
98d4179784
commit
b75b6aafe1
|
@ -65,6 +65,7 @@ function gpg_export_public_key {
|
||||||
key_id=$2
|
key_id=$2
|
||||||
key_filename=$3
|
key_filename=$3
|
||||||
|
|
||||||
|
chown -R $key_username:$key_username /home/$key_username/.gnupg
|
||||||
su -m root -c "gpg --homedir /home/$key_username/.gnupg --output $key_filename --armor --export $key_id" - $key_username
|
su -m root -c "gpg --homedir /home/$key_username/.gnupg --output $key_filename --armor --export $key_id" - $key_username
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,6 +74,7 @@ function gpg_export_private_key {
|
||||||
key_id=$2
|
key_id=$2
|
||||||
key_filename=$3
|
key_filename=$3
|
||||||
|
|
||||||
|
chown -R $key_username:$key_username /home/$key_username/.gnupg
|
||||||
su -m root -c "gpg --homedir=/home/$key_username/.gnupg --armor --output $key_filename --export-secret-key $key_id" - $key_username
|
su -m root -c "gpg --homedir=/home/$key_username/.gnupg --armor --output $key_filename --export-secret-key $key_id" - $key_username
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue