免费注册 查看新帖 |

Chinaunix

广告
  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 5694 | 回复: 1
打印 上一主题 下一主题

[Web] Apache中的SuExecUserGroup怎么没有作用? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-03-01 16:49 |只看该作者 |倒序浏览
我安装的是2.2.4版本:

  1. tar -zxvf httpd-2.2.4.tar.gz
  2. cd httpd-2.2.4
  3. ./configure --prefix=/usr/local/apache2 --enable-mods-shared=most --enable-modules=most --enable-so --enable-suexec --with-s
  4.         uexec-caller=daemon --with-suexec-docroot=/usr/www
  5. make
  6. make install
复制代码


然后创建一个网站test.xxx.cn:

  1. cd /usr/www
  2. mkdir test.xxx.cn
复制代码


建立了用户test和用户组test:

  1. groupadd test
  2. useradd -g test test
复制代码


设置虚拟主机的权限:

  1. chown test:test test.xxx.cn -R
  2. chmod 770 test.xxx.cn
复制代码


httpd.conf的部分配置如下:

  1. .
  2. .
  3. .
  4. LoadModule suexec_module    modules/mod_suexec.so

  5. <IfModule !mpm_netware_module>
  6. User daemon
  7. Group daemon
  8. </IfModule>

  9. ServerAdmin you@example.com
  10. DocumentRoot "/usr/local/apache2/htdocs"

  11. Listen 80

  12. NameVirtualHost *:80

  13. <VirtualHost *:80>
  14.     DocumentRoot /usr/www/test.xxx.cn
  15.     ServerName test.xxx.cn
  16.     SuexecUserGroup test test

  17.     <Directory "/usr/www/test.xxx.cn">
  18.         Options Indexes FollowSymLinks
  19.         AllowOverride None
  20.         Order allow,deny
  21.         Allow from all
  22.         DirectoryIndex index.php index.html
  23.     </Directory>
  24. </VirtualHost>
  25. .
  26. .
  27. .
复制代码


启动Apache正常,浏览站点test.xxx.cn/test.php时出现
Forbidden
You don't have permission to access / on this server.

可是
chmod 775 test.xxx.cn -R
后就正常了,屏幕上显示
Hostnameort         test.xxx.cn:0
User/Group         daemon(2)/2
Max Requests         Per Child: 10000 - Keep Alive: on - Max Per Connection: 100

论坛徽章:
0
2 [报告]
发表于 2013-01-31 17:42 |只看该作者
我也遇到了
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP