The httpd-suexec package is part of the httpd source RPM. As part of the
security
model of suexec, a directory is hard coded into /usr/sbin/suexec
(/var/www in
Centos 4) that must be the root of all cgi-bin directories on the
system. As an
alternate, the UserDir (/home/*/public_html) may be enabled for CGI
execution -
but this is not done by default.
As a web-hosting company, we prefer to move the default cgi-bin directory to
/home/cgi-bin (and subdirectories) rather than /var/www. This permits us
to keep
all customer files on one filesystem (/home) and still use
Webmin/Usermin/Virtualmin.
This also makes it easier to enforce quota restrictions.
This is the way we add virtual systems (using cilia as an example):
mkdir /home/cgi-bin/cilia
chmod 755 /home/cgi-bin/cilia
chown cilia.cilia /home/cgi-bin/cilia
ln -s /home/cilia/cgi-bin /home/cgi-bin/cilia
This follows the security model described in
http://httpd.apache.org/docs-2.0/suexec.html
although I'm not sure why this restriction is necessary. You get some
obscure error
messages about "premature end of script headers" if you don't do this
correctly. The
real error is written to /var/log/httpd/suexec.log but takes a while to
find.
The change to make this is simple - two lines in the httpd.spec file (
could be one ):
%define cgidir /home/cgi-bin <--- added line
--with-suexec-docroot=%{cgidir} \ <--- changed line
Is this worth doing in CentosPlus? It looks like you have to recompile
all of httpd
(Apache 2.x) even though you're only changing the one file in the sub
package.
The tool I use for managing my local CentOS-3 mirror has started to
choke on some changes to the centos mirrors.
The URL I am using is:
http://mirror.centos.org/centos-3/3/updates/i386/
And I get the error:
/tmp/rpmfindjLOxxX:271: error: htmlParseEntityRef: expecting ';'
to donate a server: <a href="mailto:johnny@centos.org?subject=Server
Donation&c
The offending html is:
<a href="mailto:johnny@centos.org?subject=Server
Donation&cc=lance(a)centos.org ">Contact us</a>
I am not using rpmfind, but reusing code I wrote for rpmfind (the
http/html downloader).
The problem appears to be libxml (libxml2-2.4.19-6.ent) barfing. I
wonder though if the page being generated by the server is valid?
As a workaround I pointed to:
http://master.centos.org/centos-3/3/updates/i386/
which works but kind of defeats the purpose.
...
I checked the page with the w3c html valiadtor. Not good
http://validator.w3.org/check?uri=http%3A%2F%2Fmirror.centos.org%2Fcentos-3…
Line 57, column 206: cannot generate system identifier for general
entity "cc"
...y(a)centos.org?subject=Server Donation&cc=lance(a)centos.org ">Contact
us</a></b>
An entity reference was found in the document, but there is no reference
by that name defined. Often this is caused by misspelling the reference
name, unencoded ampersands, or by leaving off the trailing semicolon
(;). The most common cause of this error is unencoded ampersands in URLs
as described by the WDG in "Ampersands in URLs".
Entity references start with an ampersand (&) and end with a semicolon
(;). If you want to use a literal ampersand in your document you must
encode it as "&" (even inside URLs!). Be careful to end entity
references with a semicolon or your entity reference may get interpreted
in connection with the following text. Also keep in mind that named
entity references are case-sensitive; &Aelig; and æ are different
characters.
Note that in most documents, errors related to entity references will
trigger up to 5 separate messages from the Validator. Usually these will
all disappear when the original problem is fixed.
John.
--
John Newbigin
Computer Systems Officer
Faculty of Information and Communication Technologies
Swinburne University of Technology
Melbourne, Australia
http://www.ict.swin.edu.au/staff/jnewbigin
Johnny Hughes wrote:
>
> Now there is a Readme.txt in this directory:
With a capital R? README or readme.txt would be more common spellings
under Unix/Linux.
The other problem with a single readme file is that it can't be
contributed by more than one person, so if a new RPM comes along, the
person with the master readme has to edit and upload it. If the readme
was per RPM or set of RPMs then that would not be a problem. You could
also include info like who built the RPM and how to contact them etc.
README.php
README.kernel
etc. could be one way of doing this (in a docs directory?)
John.
>
> http://mirror.centos.org/centos/4/centosplus/
>
> There will be one for contrib and extras later today.
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> CentOS mailing list
> CentOS(a)centos.org
> http://lists.centos.org/mailman/listinfo/centos
--
John Newbigin
Computer Systems Officer
Faculty of Information and Communication Technologies
Swinburne University of Technology
Melbourne, Australia
http://www.ict.swin.edu.au/staff/jnewbigin
I am building a custom CentOS 4.0 based distribution (basically, trimmed
down size and a few custom packages). I have successfully built other
RPM-based distributions in the past without much trouble. However, this
CentOS 4.0-based one is giving me headaches.
The document I follow for remastering CentOS 4.0 is this one:
http://fedoranews.org/contributors/gene_czarcinski/update_distro/
I know it is written for FC3, but I also was under the impression it
contained information more general.
When I run buildinstall with the CentOS 4.0 RPMs (right now, it contains
no custom RPMs, these are all stock CentOS 4.0) it creates boot images
which do not contain the anaconda script (/usr/bin/anaconda). Here is
the relevant output:
prickly-pear:/work# buildinstall --pkgorder $BASE/custom/pkgfile \
> --version 1 --product "Custom01" --release "Custom01" --prodpath CentOS $BASE/custom/i386
warning: /work/custom/i386/CentOS/RPMS/anaconda-runtime-10.1.1.13-1.centos4.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
Running buildinstall...
/work/custom/i386/buildinstall.tree.21011 /work
/work
Going to run buildinstall again
warning: /work/custom/i386/CentOS/RPMS/anaconda-runtime-10.1.1.13-1.centos4.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
Building images...
Assembling package list...
Expanding text packages...
Expanding graphical packages...
retrieving timezones
Creating nsswitch.conf
Fixing up /etc/man.config to point into /mnt/sysimage
Running mkfontdir...
/work/custom/i386/buildinstall.tree.21011/upd-instroot: line 929: /usr/X11R6/bin/mkfontdir: No such file or directory
Getting pango modules
/usr/sbin/chroot: cannot run command `/usr/bin/pango-querymodules': No such file or directory
Getting gtk2 input method modules
/usr/sbin/chroot: cannot run command `/usr/bin/gtk-query-immodules-2.0': No such file or directory
Getting gtk2 gdk-pixbuf loaders
/usr/sbin/chroot: cannot run command `/usr/bin/gdk-pixbuf-query-loaders': No such file or directory
Scrubbing trees... /tmp/treedir.21024/image-template
/usr/sbin/chroot: cannot run command `usr/sbin/ldconfig': No such file or directory
Scrubbing trees... /tmp/treedir.21024/instimage
cp: cannot stat `/tmp/treedir.21024/instimage/boot/memtest*': No such file or directory
/usr/sbin/chroot: cannot run command `usr/sbin/ldconfig': No such file or directory
Compressing .mo files in stage2 images...
Creating fontconfig cache
/usr/sbin/chroot: cannot run command `/usr/bin/fc-cache': No such file or directory
Creating debug dir
Patching python library...
Removing unused python files in hdimage... /usr/sbin/chroot: cannot run command `/usr/bin/anaconda': No such file or directory
I have googled for this error, and found many mentions of it, but no
real solutions. The anaconda-runtime, anaconda, anaconda-help and
busybox-anaconda packages are all installed and present as RPMs in the
RPM asset directory (/work/custom/i386/CentOS/RPMS). Similarly, the
other files that report errors (`usr/sbin/ldconfig', etc) are installed
and present with their parent RPMs in the RPM asset directory.
I am reasonably certain that I have dependency closure on these RPMs (I
have made in-house rpmstrap scripts for it and can install via
bootstrap), and my comps.xml file seems correct.
Has anyone ever seen this "/usr/sbin/chroot: cannot run command
`/usr/bin/anaconda'" error ever before? If so, any suggestions for what
I can do to fix this?
I'm not certain if this is the right place to ask this, but since the
only RPM-base that is giving me this problem is CentOS 4.0 I figured it
was the best place to go.
--
'''''''''''''''''''''''''
.O. Sam Hart, sam(a)progeny.com
..O Progeny Linux Systems, Inc
OOO <http://www.progeny.com/>