红联Linux门户
Linux帮助

apache怎么没有权限调用sendmail发信

发布时间:2013-11-28 09:14:48来源:红联作者:红名
首次安装LAMP环境和SENDMAIL服务在网站运行时发信正常,前段时间因apache权限问题去掉了apache默认用户和组,接着又恢复回来。之后网站发信一直提示“无法正常使用邮件相关函数.”

详细情况:从网站后台上传的文件FTP用户无权限修改,FTP用户上传的文件网页后台无法删改(apache用户);因此找到了http.conf配置文件注释掉apache默认用户。[code]
#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
#User daemon 注释掉
#Group daemon 注释掉
[/code]结果发现FTP用户上传的文件apache即网页后台可进行删改,但网页后台上传的文件FTP用户依然没有权限删改,因为此时apache的身份已经是root了,这种情况很不安全,所以继续到http.conf配置中恢复[code] User daemon
Group daemon /code]这两项的注释。
不过进行这么操作过后,网页自带的程序无法进行发信功能了。提示“无法正常使用邮件相关函数。”但我又给[code]#User daemon 注释掉
#Group daemon 注释掉[/code]换成root帐户发信又正常。我觉的是apache的默认权限问题导致的,我百度和google查了很多依旧没有答案,请求帮助。
文章评论

共有 0 条评论