我有一个问题,其中/ var / lib / php / session的权限被覆盖,所以我不能再在PHP中创build会话variables。
我觉得我的邮件function也一样。 邮件function位于Linux服务器,以便我可以chmod它在哪里?
一些额外的信息:
$ "This is a test" | mail -s "Testing 123" [email protected] -bash: This is a test: command not found Null message body; hope that's ok postdrop: warning: mail_queue_enter: create file maildrop/111989.3781: Permission denied postdrop: warning: mail_queue_enter: create file maildrop/112524.3781: Permission denied postdrop: warning: mail_queue_enter: create file maildrop/113649.3781: Permission denied postdrop: warning: mail_queue_enter: create file maildrop/114574.3781: Permission denied postdrop: warning: mail_queue_enter: create file maildrop/115551.3781: Permission denied chmod: changing permissions of `/usr/sbin/sendmail.postfix': Operation not permitted chmod: changing permissions of `/usr/sbin/sendmail': Operation not permitted
mail()函数根据你的configuration做许多不同的事情。 例如,您可以将其指向外部SMTP服务器,如果是这种情况,那么本地系统上没有任何东西可以触摸。
如果你没有改变它的默认值,那么你正在系统上运行一些邮件传输代理,但有很多的可能性。 你真的运行sendmail,或者你只是运行一些具有兼容sendmail的工具吗? 我相信Postfix是Centos上的默认MTA。 不幸的是我不知道假脱机文件夹是什么命名的,默认的权限应该是什么。
如果没有人回答具体的问题,那么我build议你快速设置一个类似于你的主系统的虚拟机,然后简单地比较然后修复权限。
从命令行shell中,你也可以testing一些东西。 只需运行一个像echo 'test' | sendmail [email protected]的命令 echo 'test' | sendmail [email protected] 。
检查php.ini中设置的sendmail_pathvariables(默认为:/ usr / sbin / sendmail),php mail()函数将使用该variables。
# /etc/postfix/post-install set-permissions