Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    May 2004
    Location
    Earth
    Posts
    9
    cPanel/Enkompass Access Level

    Root Administrator

    Default use /usr/sbin/sendmail in php exec()

    when I use /usr/sbin/sendmail directly in a php exec() this error is reported: "sendmail cannot be called directly from a shell with the current user id".

    I've already tried /scripts/eximup --force that changed permissions from -rwsr-sr-t to -rwxr-sr-x but didn't worked; I've also upgraded from 4.52 to 4.62 (downloaded from diff.cpanel.net) but no results again.

  2. #2
    Member
    Join Date
    Jan 2005
    Posts
    1,880

    Default

    Firstly, why do you want to use exec() to send mail via sendmail - can't the mail() function be used?

    Secondly, check that you don't have the SMTP tweak enabled in WHM > Tweak Security

  3. #3
    Member
    Join Date
    May 2004
    Location
    Earth
    Posts
    9
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by webignition
    Firstly, why do you want to use exec() to send mail via sendmail - can't the mail() function be used?
    Well, Mailwatch asks for it, so I must follow his rules

    Quote Originally Posted by webignition
    Secondly, check that you don't have the SMTP tweak enabled in WHM > Tweak Security
    I've disabled the SMTP tweak, but it doesn't work. It reports the same error.

  4. #4
    Member avijit's Avatar
    Join Date
    Jul 2004
    Location
    India
    Posts
    116

    Default

    Try checking the permission of the /usr/sbin/sendmail binary .
    Stop Reymond !! A single conversation with a wise man is better than ten years of study. So....

  5. #5
    Member
    Join Date
    May 2004
    Location
    Earth
    Posts
    9
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by avijit
    Try checking the permission of the /usr/sbin/sendmail binary .
    now they are set in this way:
    Code:
    -rwxr-sr-x    1 root     mailtrap     8599 Aug 16  2005 sendmail*
    How should I set them?

Similar Threads & Tags
Similar threads

  1. /usr/bin/python -E /usr/sbin/setroubleshootd overloading
    By DWHS.net in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 05-30-2011, 06:04 AM
  2. What is the correct permission to /usr/sbin/sendmail?
    By cokequai in forum E-mail Discussions
    Replies: 2
    Last Post: 10-20-2009, 05:26 PM
  3. /usr/sbin/sendmail: Exec format error
    By tata13 in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 03-10-2007, 10:56 AM
  4. open base dir, PHP exec and shell exec
    By tris in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 05-25-2006, 03:07 PM
  5. re-exec of exim (/usr/sbin/exim) with -Mc failed: Permission denied
    By 65535 in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 03-15-2004, 05:01 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube