大侠救救我,就剩这一步了!

大侠救救我,就剩这一步了!

我的系统是qmail+ldap+sqwebmail,
apache要以什么用户执行?
sqwebmail程序的执行权限应该怎样设置?
那/usr/local/apache/htdocs/libexec/authlib/authdaemond start这个程序呢?

我现在有两种情况:
一种是验证失败,INVALID USER ID OR PASSWORD
别一种是:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, wind@sd163.net and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
--------------------------------------------------------------------------------
Apache/1.3.20 Server at mail.sd163.net Port 80
日志中写:
setgid: Operation not permitted
[Sun Jul 29 14:30:47 2001] [error] [client 61.156.28.176] Premature end of script headers: /usr/local/apache/cgi-bin/sqwebmail

如果现在authdaemond程序用root运行
其它的:apache,apache的htdocs、cgi-bin,及以下的所有文件都属于vmail用户,apache也以vmail用户运行
可是日志中写:
authdaemon: connect: Permission denied
authdaemon: connect: Permission denied
authdaemon: connect: Permission denied
chdir: No such file or directory
[Sun Jul 29 14:40:07 2001] [error] [client 61.156.28.176] Premature end of script headers: /usr/local/apache/cgi-bin/sqwebmail

哪位大侠告诉我这几个程序道底应该如何设置权限和用户      
其他的我不太知道,不过出现一下信息
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, wind@sd163.net and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.

是由于你的权限不对造成的,一个是在用户的目录下(也就是放网页的那个目录)有一个隐含文件.htaccess造成的.
另外你在设置httpd.conf的时候,需要给定指定目录权限
<Directory "/home/xxxx/xxxxx">
    Options Indexes Includes FollowSymLinks
    AllowOverride Limit AuthConfig(All 会读取.htaccess这个文件或None不读取这个文件)
    Order allow,deny
    Allow from all
</Directory>      
如果支持fp时,需要去掉引号和  AllowOverride  All
希望能帮到你!
      
<Directory "/home/xxx/xxx">
    Options Indexes Includes FollowSymLinks
    AllowOverride Limit AuthConfig
    Order allow,deny
    Allow from all
</Directory>   
不好意思,刚才这个目录好像没有显示呢?      
咦!怎么还不显示呢?<Directory "/home/xxx/xxx">这样的目录!