1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice

shell_exec() and email creation

Discussion in 'Plesk for Linux - 8.x and Older' started by jeffparis, Apr 3, 2005.

  1. jeffparis

    jeffparis Guest

    0
     
    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 root@ns3.domain.com -i /root/.ssh/id_rsa /usr/local/psa/bin/mail.sh --create XXXXXXX@freeonlineblogs.com -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:)
     
  2. irzyxel

    irzyxel Guest

    0
     
    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 - ?
     
  3. jeffparis

    jeffparis Guest

    0
     
    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:)
     
Loading...