I have a tricky step to walk for my system (openvpn, 20 clients - raspberries, 1 server CentOS).
I want to make an auto install, from clients, for their keys. They call a php page on the server, which generate a .tar containing client.key, client.crt & ca.crt (and conf).
Allright this works perfectly in root ssh. Now I make a php script with a shell_exec(my shell script).
But almost all commands fails. A matter of being root or not (my php is in /home/non-root-user/public_html/testgenerateforinit)
for instance : pkitool, cp /etc/openvpn/mykey.tgz /home/.../public_html/.../ fails in php.
How should I process ? Tks