• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

shell_exec() and email creation

J

jeffparis

Guest
I just can not get this to run in the browser. The file is chowned and chmodded to allow root to run and I can run it successfully in SSH.



<?php
shell_exec('ssh [email protected] -i /root/.ssh/id_rsa /usr/local/psa/bin/mail.sh --create [email protected] -mailbox true -cp_access true -mailbox true -passwd XXXXXXXXXXXX \n');
?>



When I call from a browser, it just hangs.

I had better luck integrating with cPanel, but then again, cPanel crashed daily:)
 
apache aint running as root, is it ?
so you need to allow that file for the apache user, but you dont want everybody to run that file ...

su_exec ?
su - ?
 
I've never heard of su_exec, I will hav eto research this. Thank you for your feedback, I hope it points in the right direction.:)

No, I am running Apache under the defualt user. I hate running as root, it's scary:)
 
Back
Top