我正在尝试分析一个在with中fcgi
运行的应用程序(C++)。所以是 Centos 6 x86_64。apache
mod_fascgi
perftools
问题如下。根据gperftools 文档
“出于安全原因,CPU 分析不会写入文件——因此不能用于 setuid 程序。”
Apache 必须以 启动root
,然后使用 setuid 以apache
作为用户使用,因此使用setuid
. 然后gperftools
不会写入文件。并且运行 Apache asroot
也被禁用。
有什么解决办法吗?
到目前为止,我想到了 3 个解决方案:
- 在应用程序中创建一个测试来模拟一些请求和模拟 FCGI 类。
- 使用标志 -DBIG_SECURITY_HOLE 重新编译 Apache 以允许以 root 身份运行 apache。
- 重新编译 gperftools 去掉对 suid 的检查。