<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: 'chroot'ing an apache environment. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/chroot-ing-an-apache-environment/m-p/2617438#M37932</link>
    <description>You'll probably also need /etc/nsswitch.conf, and the shared libraries that make this work -/usr/lib/libnss_files.1 and /usr/lib/libnss_nis.1.  &lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Steve&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 20 Nov 2001 12:36:32 GMT</pubDate>
    <dc:creator>Steven Gillard_2</dc:creator>
    <dc:date>2001-11-20T12:36:32Z</dc:date>
    <item>
      <title>'chroot'ing an apache environment.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/chroot-ing-an-apache-environment/m-p/2617435#M37929</link>
      <description>hpux11.&lt;BR /&gt;Have installed apache 1.3.13 - into default /opt/apache - all appears ok.&lt;BR /&gt;Would like to 'chroot' the apache install into /web/chroot.&lt;BR /&gt;Have created the relevant structure. copied all the /opt/apache files into /web/chroot/opt/apache. But when attempting to start it witt #chroot /web/chroot /opt/apache/bin/apachectl start I get the following error:-  httpd: bad user www&lt;BR /&gt;I am starting it from root login (the same as I do from the non chroot environment). Is there a file missing that allows apache to spawn the processess as www but is currently unable to under a chroot?&lt;BR /&gt;Please help me!!&lt;BR /&gt;Dan.</description>
      <pubDate>Tue, 20 Nov 2001 11:37:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/chroot-ing-an-apache-environment/m-p/2617435#M37929</guid>
      <dc:creator>Daniel Hart</dc:creator>
      <dc:date>2001-11-20T11:37:39Z</dc:date>
    </item>
    <item>
      <title>Re: 'chroot'ing an apache environment.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/chroot-ing-an-apache-environment/m-p/2617436#M37930</link>
      <description>I think you'll need a 'cut-down' version of your passwd file, at least containing the www user entry, in /web/chroot/etc.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Steve</description>
      <pubDate>Tue, 20 Nov 2001 11:45:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/chroot-ing-an-apache-environment/m-p/2617436#M37930</guid>
      <dc:creator>Steven Gillard_2</dc:creator>
      <dc:date>2001-11-20T11:45:11Z</dc:date>
    </item>
    <item>
      <title>Re: 'chroot'ing an apache environment.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/chroot-ing-an-apache-environment/m-p/2617437#M37931</link>
      <description>I've got a /web/chroot/etc/passwd file (I actually copied the original one in it's entirity). The permissions seem ok to.</description>
      <pubDate>Tue, 20 Nov 2001 12:03:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/chroot-ing-an-apache-environment/m-p/2617437#M37931</guid>
      <dc:creator>Daniel Hart</dc:creator>
      <dc:date>2001-11-20T12:03:19Z</dc:date>
    </item>
    <item>
      <title>Re: 'chroot'ing an apache environment.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/chroot-ing-an-apache-environment/m-p/2617438#M37932</link>
      <description>You'll probably also need /etc/nsswitch.conf, and the shared libraries that make this work -/usr/lib/libnss_files.1 and /usr/lib/libnss_nis.1.  &lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Steve&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Nov 2001 12:36:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/chroot-ing-an-apache-environment/m-p/2617438#M37932</guid>
      <dc:creator>Steven Gillard_2</dc:creator>
      <dc:date>2001-11-20T12:36:32Z</dc:date>
    </item>
    <item>
      <title>Re: 'chroot'ing an apache environment.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/chroot-ing-an-apache-environment/m-p/2617439#M37933</link>
      <description>Do you have a www user in /etc/passwd?&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Tue, 20 Nov 2001 12:39:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/chroot-ing-an-apache-environment/m-p/2617439#M37933</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2001-11-20T12:39:21Z</dc:date>
    </item>
    <item>
      <title>Re: 'chroot'ing an apache environment.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/chroot-ing-an-apache-environment/m-p/2617440#M37934</link>
      <description>There is a www user in /web/chroot/etc/passwd - it's the same file as the /etc/passwd file - I just copied it over - and apache runs ok from it's original installation , (opt/apache - outside the chroot.</description>
      <pubDate>Tue, 20 Nov 2001 13:12:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/chroot-ing-an-apache-environment/m-p/2617440#M37934</guid>
      <dc:creator>Daniel Hart</dc:creator>
      <dc:date>2001-11-20T13:12:45Z</dc:date>
    </item>
    <item>
      <title>Re: 'chroot'ing an apache environment.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/chroot-ing-an-apache-environment/m-p/2617441#M37935</link>
      <description>I don't have an /etc/nsswitch.conf file. &lt;BR /&gt;As Apache appears to run ok from it's initial non chrooted location (/opt/apache), surely the problem must be that I need to move a particular file into the chrooted environment?</description>
      <pubDate>Tue, 20 Nov 2001 13:46:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/chroot-ing-an-apache-environment/m-p/2617441#M37935</guid>
      <dc:creator>Daniel Hart</dc:creator>
      <dc:date>2001-11-20T13:46:59Z</dc:date>
    </item>
    <item>
      <title>Re: 'chroot'ing an apache environment.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/chroot-ing-an-apache-environment/m-p/2617442#M37936</link>
      <description>Yes, any file required by Apache to run will need to be available under the chroot'd location.  If you don't have /etc/nsswitch.conf thats ok because the default switch policy will be used.&lt;BR /&gt;&lt;BR /&gt;I've never done this with Apache, so the following is not a definitive list, but these are the files that I would think are necessary.  If any aren't copied over then I wouldn't expect Apache to work.&lt;BR /&gt;&lt;BR /&gt;Shared libraries (copy to {chroot}/usr/lib):&lt;BR /&gt;libc.2, libm.2, libpthread.1, libdld.2, dld.sl, libnss_files.1, libnss_nis.1, libnss_dns.1&lt;BR /&gt;&lt;BR /&gt;Files from /etc:&lt;BR /&gt;passwd, group, nsswitch.conf, hosts, resolv.conf&lt;BR /&gt;&lt;BR /&gt;Any common utility called by Apache's scripts (copy to {chroot}/usr/bin):&lt;BR /&gt;sh, cat ... (I'm sure there are others)&lt;BR /&gt;&lt;BR /&gt;Before running apache I would also change the shared library binding of the httpd program to 'immediate'.  This will cause httpd to fail on startup if there are any more missing libraries &amp;amp; symbols.  Do this with the chatr command:&lt;BR /&gt;&lt;BR /&gt;# chatr -B immediate httpd&lt;BR /&gt;&lt;BR /&gt;Once you know if works you can change it back with:&lt;BR /&gt;&lt;BR /&gt;# chatr -B deferred httpd&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Steve&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Nov 2001 14:11:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/chroot-ing-an-apache-environment/m-p/2617442#M37936</guid>
      <dc:creator>Steven Gillard_2</dc:creator>
      <dc:date>2001-11-20T14:11:05Z</dc:date>
    </item>
    <item>
      <title>Re: 'chroot'ing an apache environment.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/chroot-ing-an-apache-environment/m-p/2617443#M37937</link>
      <description>Thanks a lot everyone (particulary Steven).&lt;BR /&gt;Once I'd copied libnss_files.1, libnss_nis.1 &amp;amp; libnss_dns.1 all was ok. I would think that, judging by the filenames, the library I required was libnss_files.1 as I don't use NIS or DNS.&lt;BR /&gt;Again, many thanks.&lt;BR /&gt;Dan.</description>
      <pubDate>Tue, 20 Nov 2001 16:00:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/chroot-ing-an-apache-environment/m-p/2617443#M37937</guid>
      <dc:creator>Daniel Hart</dc:creator>
      <dc:date>2001-11-20T16:00:53Z</dc:date>
    </item>
  </channel>
</rss>

