mail: failed to open stream: Permission denied?

后端 未结 3 1858
南方客
南方客 2020-12-16 08:28

I get this warning sending mails with php Warning: mail(1) [function.mail]: failed to open stream: Permission denied in /home/...

  • using ssmtp and gmail as smtp
3条回答
  •  情歌与酒
    2020-12-16 09:12

    It turns out to be a file permissions problems after all. But not in the scripts, but in the directory. I ran a chmod -R 777 * and the warning went of. upon further examination I found a file called 1, and this file contained a log of the sent mails. The warning was php telling me that he was unable to open this file

    Solution:

     sudo chmod -R 755 *
     sudo chmod  777 1
    

    F#$%^% cryptic php error messages

提交回复
热议问题