duanqu9279
2013-06-20 17:28
浏览 25
已采纳

避免以root身份运行apache [关闭]

I am working on Apache server on localhost in Linux mint and need to create new file and folder using php script. But it is returning permission denied on 'mkdir' function.

I googled and found that Apache needs to run as root for such permissions. It is running as 'www-data' in my machine. But I also found that running Apache as root will open many vulnerabilities and there is no situation where Apache is needed to run as root.

How to overcome permission restrictions in apache?

图片转代码服务由CSDN问答提供 功能建议

我正在Linux mint中的localhost上使用Apache服务器,需要使用php脚本创建新文件和文件夹。 但它正在'mkdir'函数返回权限被拒绝。

我用Google搜索并发现Apache需要以root身份运行才能获得此类权限。 它在我的机器中以'www-data'运行。 但我也发现以root身份运行Apache会打开很多漏洞,而且根本不需要Apache以root身份运行。

如何克服apache中的权限限制?

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

1条回答 默认 最新

相关推荐 更多相似问题