I am able to encrypt using PuTTY from the command line, but not from my web-page.
Here is my line of PHP code: system("/usr/bin/gpg --homedir /gnupg-files/.gnupg --encrypt -ao encryptedfile.txt -r 'Rhiannon <rhiannon@viva.org.uk>' 789.txt");
When I use PuTTY I type this in:
[timetogoveggie.com@shell1c40 /]$ gpg --homedir /gnupg-files/.gnupg --encrypt -a o encryptedfile.txt -r rhiannon@viva.org.uk 789.txt
Initially I thought it was a permissions problem but I seem to be logged in to PuTTY as the same user as I am on the website:
Website user:
<?php
echo system("id");
?>
gives me
uid=186655(timetogoveggie.com) gid=100(users) groups=65533(nobody),65534(nogroup) uid=186655(timetogoveggie.com) gid=100(users) groups=65533(nobody),65534(nogroup)
PuTTY user:
[timetogoveggie.com@shell1c40 /]$ id -u
186655
[timetogoveggie.com@shell1c40 /]$ whoami
timetogoveggie.com
--------------------------------------------------------------------------------------------
We had GnuPG working nicely on the old server, then our hosting company got bought out by Aplus.net and we got moved to their servers... and now it will not work!
It simply will not create an encrypted file using GnuPG.
I am on Bash shell in Linux with fairly restricted permissions (eg. I am not allowed to use the chown command).
Do you think this could be a problem with my PHP in the line above?
Our community of experts have been thoroughly vetted for their expertise and industry experience.