[Zope] Re: nonroot user running zope on 80

John Hunter jdhunter at ace.bsd.uchicago.edu
Tue Sep 21 17:41:18 EDT 2004


>>>>> "Calvin" == Calvin Hendryx-Parker <calvin at sixfeetup.com> writes:

    Calvin> You have to start the parent process as root since it is
    Calvin> below 1024, but in the zope.conf you can set the
    Calvin> effective-user to someone else so its children will then
    Calvin> run as the non-privileged user.  Not optimal, but works.

Yes, that is what I am doing:

effective-user zope

<http-server>
  # valid keys are "address" and "force-connection-close"
  address 80
  # force-connection-close on
</http-server>
                                                                                
<ftp-server>
  # valid key is "address"
  address 21
</ftp-server>

Then starting zope as root.  I chown -R zope.zope the zope root dir to
make sure zope user had access to all the log and dbase files, etc
that it needed.  But I get the segfault when I try and run as root.

For good measure I did a clean re-install of python and zope from src
but still get the segfault.  Here are my compile notes

# setup for zope user
  user> sudo /usr/sbin/useradd -m zope
  user> sudo passwd zope

# login as zope

# configure python with zlib and LFS
  zope> CFLAGS='-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64' OPT="-g -O2 $CFLAGS" ./configure
  # Edit Modules/Setup and uncomment the zlib line; REQUIRED!
  zope> make
  root# make install

# build zope
  zope> cd /var/tmp/build/Zope-2.7.2-0/
  zope> ./configure --with-python=/usr/local/bin/python --prefix=/usr/local/Zope-2.7.2   # add the prefix - default is opt!
  zope> make
  root# make install
  root# /usr/local/Zope-2.7.2/bin/mkzopeinstance.py
    # prompted for username and passwd
    # Directory:  /usr/local/Zope-2.7.2/zope_instance  
    # username : zope
    # passwd   : whatever

# set the ownership
root# chown -R zope.zope /usr/local/Zope-2.7.2

# login as zope; change effective user to zope and the ports
zope> emacs -q -nw /usr/local/Zope-2.7.2/zope_instance/etc/zope.conf  

# login as root at start zope
root# /usr/local/Zope-2.7.2/zope_instance/bin/runzope
------
2004-09-21T17:29:36 INFO(0) ZServer HTTP server started at Tue Sep 21 17:29:36 2004
        Hostname: localhost.localdomain
        Port: 80
------
2004-09-21T17:29:36 INFO(0) ZServer FTP server started at Tue Sep 21 17:29:36 2004
        Hostname: crcdocs.bsd.uchicago.edu
        Port: 21
Segmentation fault


More information about the Zope mailing list