[Zope-DB] Zope_Database_issue

smita kamdar smita.kamdar00 at gmail.com
Fri Nov 19 06:32:07 EST 2010


Hi,



To make the permissions, owner & group of all the installables same, I
changed the permissions to 777 & owner & group to root for all the
installables.



Now I am able to get the output of the following commands -

[root at test bin]# ls -l /home/postgres/7.4.13/lib/libpq.so.3

lrwxrwxrwx. 1 root root 12 2010-11-09 23:59
/home/postgres/7.4.13/lib/libpq.so.3 -> libpq.so.3.1



[root at test bin]# export LD_LIBRARY_PATH=/home/postgres/7.4.13/lib

[root at test bin]# echo $LD_LIBRARY_PATH

/home/postgres/7.4.13/lib



[root at test bin]# ldd
/home/test/Python/2.4.4/lib/python2.4/site-packages/psycopgmodule.so | grep
libpq.so

        libpq.so.3 => /home/postgres/7.4.13/lib/libpq.so.3 (0x005b1000)



But when I start the zope as root user, I face the following error -



[root at test bin]# ./zopectl fg

/opt/zope/bin/runzope -X debug-mode=on

2010-11-19 21:10:21 INFO ZServer HTTP server started at Fri Nov 19 21:10:21
2010

        Hostname: 0.0.0.0

        Port: 8080

2010-11-19 21:10:21 CRITICAL Zope A user was not specified to setuid to; fix
this to start as root (change the effective-user directive in zope.conf)

Traceback (most recent call last):

  File "/opt/zope/lib/python/Zope2/Startup/run.py", line 56, in ?

    run()

  File "/opt/zope/lib/python/Zope2/Startup/run.py", line 21, in run

    starter.prepare()

  File "/opt/zope/lib/python/Zope2/Startup/__init__.py", line 105, in
prepare

    self.dropPrivileges()

  File "/opt/zope/lib/python/Zope2/Startup/__init__.py", line 256, in
dropPrivileges

    return dropPrivileges(self.cfg)

  File "/opt/zope/lib/python/Zope2/Startup/__init__.py", line 425, in
dropPrivileges

    raise ZConfig.ConfigurationError(msg)

ZConfig.ConfigurationError: A user was not specified to setuid to; fix this
to start as root (change the effective-user directive in zope.conf)





The effective user part in /etc/zope.conf file looks as shown below -

-------------------------------------------------------------------------------------------------------------------------------------------------------------------

# Directive: effective-user

#

# Description:

#     If you intend to run Zope as the "root" user, you must supply this

#     directive with an effective username or userid number to which Zope

#     will 'suid' after the server ports are bound. This directive only

#     has effect under UNIX and if Zope is started as the root user.

#

# Default: unset

#

# Example:

#

# effective-user chrism

-----------------------------------------------------------------------------------------------------------------------------------------------------------------



As, they have said to change the effective-user directive in zope.conf, I
changed the effective user part in the file as shown below –



-------------------------------------------------------------------------------------------------------------------------------------------------------------------



# Directive: effective-user

#

# Description:

#     If you intend to run Zope as the "root" user, you must supply this

#     directive with an effective username or userid number to which Zope

#     will 'suid' after the server ports are bound. This directive only

#     has effect under UNIX and if Zope is started as the root user.

#

# Default: unset

#

# Example:

#

    effective-user root





After changing the above file, When I started zope as root, it is showing
the below error –



[root at test bin]# ./zopectl fg

/opt/zope/bin/runzope -X debug-mode=on

2010-11-19 21:19:47 INFO ZServer HTTP server started at Fri Nov 19 21:19:47
2010

        Hostname: 0.0.0.0

        Port: 8080

2010-11-19 21:19:47 ERROR Zope Cannot start Zope with the effective user as
the root user

Traceback (most recent call last):

  File "/opt/zope/lib/python/Zope2/Startup/run.py", line 56, in?

    run()

  File "/opt/zope/lib/python/Zope2/Startup/run.py", line 21, in run

    starter.prepare()

  File "/opt/zope/lib/python/Zope2/Startup/__init__.py", line 105, in
prepare

    self.dropPrivileges()

  File "/opt/zope/lib/python/Zope2/Startup/__init__.py", line 256, in
dropPrivileges

    return dropPrivileges(self.cfg)

  File "/opt/zope/lib/python/Zope2/Startup/__init__.py", line 449, in
dropPrivileges

    raise ZConfig.ConfigurationError(msg)

ZConfig.ConfigurationError: Cannot start Zope with the effective user as the
root user





Have I made any mistake in changing the effective user part in zope.conf ?



Do you think I have done right? Or is this some other error?



Also find attached the two files in which it is showing errors.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope-db/attachments/20101119/184cd0f8/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: run.zip
Type: application/x-zip-compressed
Size: 1018 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope-db/attachments/20101119/184cd0f8/attachment-0002.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: __init__.zip
Type: application/x-zip-compressed
Size: 4939 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope-db/attachments/20101119/184cd0f8/attachment-0003.bin 


More information about the Zope-DB mailing list