xdev 发表于 2007-03-01 16:49

Apache中的SuExecUserGroup怎么没有作用?

我安装的是2.2.4版本:

tar -zxvf httpd-2.2.4.tar.gz
cd httpd-2.2.4
./configure --prefix=/usr/local/apache2 --enable-mods-shared=most --enable-modules=most --enable-so --enable-suexec --with-s
      uexec-caller=daemon --with-suexec-docroot=/usr/www
make
make install


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

cd /usr/www
mkdir test.xxx.cn


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

groupadd test
useradd -g test test


设置虚拟主机的权限:

chown test:test test.xxx.cn -R
chmod 770 test.xxx.cn


httpd.conf的部分配置如下:

.
.
.
LoadModule suexec_module    modules/mod_suexec.so

<IfModule !mpm_netware_module>
User daemon
Group daemon
</IfModule>

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

Listen 80

NameVirtualHost *:80

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

    <Directory "/usr/www/test.xxx.cn">
      Options Indexes FollowSymLinks
      AllowOverride None
      Order allow,deny
      Allow from all
      DirectoryIndex index.php index.html
    </Directory>
</VirtualHost>
.
.
.


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

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

freeterman 发表于 2013-01-31 17:42

我也遇到了
页: [1]
查看完整版本: Apache中的SuExecUserGroup怎么没有作用?