You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by ludi <my...@gmail.com> on 2005/11/30 04:05:18 UTC

[users@httpd] A problem -- chroot the apache 2.0

[root@localhost www]# ll
total 44
drwxr-xr-x   15 root     root         4096 Nov 29 22:31 apache
lrwxrwxrwx    1 root     root            7 Nov 29 21:04 bin -> usr/bin
drwxr-xr-x    2 root     root         4096 Nov 29 21:04 dev
drwxr-xr-x    2 root     root         4096 Nov 30 09:53 etc
drwxr-xr-x    3 root     root         4096 Nov 30 09:53 lib
drwx------    2 root     root        16384 Nov 29 20:37 lost+found
drwxrwxrwt    2 root     root         4096 Nov 29 21:03 tmp
drwxr-xr-x    5 root     root         4096 Nov 29 21:04 usr
drwxr-xr-x    2 root     root         4096 Nov 29 21:03 webhome
This is my chroot directory.(/www)

/apache is the apache install directory using the command "ln -s
/www/apache /apche".
I have copy files nessary by apache ,such as config files and lib
files ,etc.....
In non-chroot environment, the web server can bind and start without
error.However, when I chroot the process ,I got a error.

[Wed Nov 30 09:56:22 2005] [notice] Digest: generating secret for
digest authentication ...
[Wed Nov 30 09:56:22 2005] [crit] (2)No such file or directory:
Digest: error generating secret: No such file or directory
Configuration Failed

I dont know which file or directory it need . Would you have some idea?
BTW:apache1.3x,I can chroot it without error.
thx

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] A problem -- chroot the apache 2.0

Posted by Joshua Slive <js...@gmail.com>.
On 11/29/05, ludi <my...@gmail.com> wrote:
> Thx, very much I mknod /dev/random.
> It is running.
> I tried the command "httpd -X".
> If there is trouble, it end immediatly without any information.
> [root@localhost dev]# chroot /www /apache/bin/httpd -X
> [root@localhost dev]#
> I removed the random file from my chroot environment.
>
> [root@localhost dev]# chroot /www /apache/bin/httpd -X
>
>
>
> [root@localhost dev]#
> I made random again,
>
> I searched the FAQ on apache web site,but it didnt contain any debug methods.
> Do you mind give me a URL?

You need to use strace or the equivalent on your platform to see what
calls are failing.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] A problem -- chroot the apache 2.0

Posted by ludi <my...@gmail.com>.
Thx, very much I mknod /dev/random.
It is running.
I tried the command "httpd -X".
If there is trouble, it end immediatly without any information.
[root@localhost dev]# chroot /www /apache/bin/httpd -X
[root@localhost dev]#
I removed the random file from my chroot environment.

[root@localhost dev]# chroot /www /apache/bin/httpd -X



[root@localhost dev]#
I made random again,

I searched the FAQ on apache web site,but it didnt contain any debug methods.
Do you mind give me a URL?

2005/11/30, Joshua Slive <js...@gmail.com>:
> On 11/29/05, ludi <my...@gmail.com> wrote:
>
> > /apache is the apache install directory using the command "ln -s
> > /www/apache /apche".
> > I have copy files nessary by apache ,such as config files and lib
> > files ,etc.....
> > In non-chroot environment, the web server can bind and start without
> > error.However, when I chroot the process ,I got a error.
> >
> > [Wed Nov 30 09:56:22 2005] [notice] Digest: generating secret for
> > digest authentication ...
> > [Wed Nov 30 09:56:22 2005] [crit] (2)No such file or directory:
> > Digest: error generating secret: No such file or directory
> > Configuration Failed
> >
> > I dont know which file or directory it need . Would you have some idea?
> > BTW:apache1.3x,I can chroot it without error.
>
> /dev/random or /dev/urandom probably.  httpd -X running under strace
> would be an essential debugging tool when trying to do a chroot.
>
> Joshua.
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] A problem -- chroot the apache 2.0

Posted by Joshua Slive <js...@gmail.com>.
On 11/29/05, ludi <my...@gmail.com> wrote:

> /apache is the apache install directory using the command "ln -s
> /www/apache /apche".
> I have copy files nessary by apache ,such as config files and lib
> files ,etc.....
> In non-chroot environment, the web server can bind and start without
> error.However, when I chroot the process ,I got a error.
>
> [Wed Nov 30 09:56:22 2005] [notice] Digest: generating secret for
> digest authentication ...
> [Wed Nov 30 09:56:22 2005] [crit] (2)No such file or directory:
> Digest: error generating secret: No such file or directory
> Configuration Failed
>
> I dont know which file or directory it need . Would you have some idea?
> BTW:apache1.3x,I can chroot it without error.

/dev/random or /dev/urandom probably.  httpd -X running under strace
would be an essential debugging tool when trying to do a chroot.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org