Re: Problem with ISPManCCP 0.0.1 alpha1

"Pedro Algarvio, aka, s0undt3ch" <[email protected]> Fri, 24 Nov 2006 02:19:47 +0000
Newsgroups gmane.comp.isp.ispman.user
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Margusja wrote:
> Hello again.
> 
> Yes I creaded account under CCP.
> 
> My .ini file is:
> 
> #
> # ISPManCCP - Pylons configuration
> #
> # The %(here)s variable will be replaced with the parent directory of
> this file
> #
> [DEFAULT]
> debug = true
> email_to = [email protected]
> smtp_server = localhost
> error_email_from = [email protected]
> 
> [server:main]
> use = egg:Paste#http
> host = 0.0.0.0
> port = 5000
> use_threadpool = true
> threadpool_workers = 10
> 
> [app:main]
> use = egg:ISPManCCP
> cache_enabled = true
> cache_data_dir = %(here)s/data/cache
> session_data_dir = %(here)s/data/sessions
> session_key = ispmanccp
> session_secret = 2uYhNp5TZsPj/CA0zzmSc/L/+
> app_instance_uuid = {0e62c8ff-e0f1-4b37-923a-5c4619cb7ee6}
> app_realm = Customer Control Panel
> ispman_base_dir = /opt/ispman
> ispman_ldap_base_dn = o=ispman
> bad_passwords_file = /usr/share/dict/cracklib-small
> passwords_min_length = 6
> passwords_non_letter_min_chars = 2
> 
> # In case you want to serve CCP from a prefix, ie, http://domain.tld/ccp
> # uncomment the following lines.
> #filter-with = proxy-prefix
> #
> #[filter:proxy-prefix]
> #use = egg:PasteDeploy#prefix
> #prefix = /ccp
> 
> # WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT*
> # Debug mode will enable the interactive debugging tool, allowing ANYONE to
> # execute malicious code after an exception is raised.
> set debug = true
> 
> And if I create new account under CCP and after try edit it then I get:
> (full trackback text version)
> 
> File
> '/usr/lib/python2.4/site-packages/Pylons-0.9.3-py2.4.egg/pylons/error.py',
> line 226 in respond
>   app_iter = self.application(environ, detect_start_response)
> File
> '/usr/lib/python2.4/site-packages/Paste-1.0-py2.4.egg/paste/httpexceptions.py',
> line 623 in __call__
>   self.send_http_response, catch=HTTPException)
> File
> '/usr/lib/python2.4/site-packages/Paste-1.0-py2.4.egg/paste/wsgilib.py',
> line 225 in catch_errors_app
>   app_iter = application(environ, start_response)
> File
> '/usr/lib/python2.4/site-packages/PasteDeploy-1.0-py2.4.egg/paste/deploy/config.py',
> line 161 in __call__
>   app_iter = self.application(environ, start_response)
> File
> '/usr/lib/python2.4/site-packages/Pylons-0.9.3-py2.4.egg/pylons/wsgiapp.py',
> line 327 in __call__
>   return self.app(environ, start_response)
> File
> '/usr/lib/python2.4/site-packages/Beaker-0.6.1-py2.4.egg/beaker/cache.py',
> line 120 in __call__
>   return self.app(environ, start_response)
> File
> '/usr/lib/python2.4/site-packages/Beaker-0.6.1-py2.4.egg/beaker/session.py',
> line 100 in __call__
>   response = self.wrap_app(environ, session_start_response)
> File
> '/usr/lib/python2.4/site-packages/Pylons-0.9.3-py2.4.egg/pylons/wsgiapp.py',
> line 95 in __call__
>   response = self.dispatch(controller, environ, start_response)
> File
> '/usr/lib/python2.4/site-packages/Pylons-0.9.3-py2.4.egg/pylons/wsgiapp.py',
> line 233 in dispatch
>   return controller(environ, start_response)
> File
> '/usr/lib/python2.4/site-packages/ISPManCCP-0.0.1alpha1-py2.4.egg/ispmanccp/lib/base.py',
> line 76 in __call__
>   return WSGIController.__call__(self, environ, start_response)
> File
> '/usr/lib/python2.4/site-packages/Pylons-0.9.3-py2.4.egg/pylons/controllers.py',
> line 147 in __call__
>   response = self._dispatch_call()
> File
> '/usr/lib/python2.4/site-packages/Pylons-0.9.3-py2.4.egg/pylons/controllers.py',
> line 94 in _dispatch_call
>   response = self._inspect_call(func)
> File
> '/usr/lib/python2.4/site-packages/Pylons-0.9.3-py2.4.egg/pylons/controllers.py',
> line 85 in _inspect_call
>   return func(*args)
> File '<string>', line 2 in edit
> File
> '/usr/lib/python2.4/site-packages/Pylons-0.9.3-py2.4.egg/pylons/decorators/rest.py',
> line 54 in dispatcher
>   return self._inspect_call(alt_method, **kwargs)
> File
> '/usr/lib/python2.4/site-packages/Pylons-0.9.3-py2.4.egg/pylons/controllers.py',
> line 85 in _inspect_call
>   return func(*args)
> File '<string>', line 2 in edit_post
> File
> '/usr/lib/python2.4/site-packages/ISPManCCP-0.0.1alpha1-py2.4.egg/ispmanccp/lib/decorators.py',
> line 107 in wrapper
>   return func(self, *args, **kwargs)
> File
> '/usr/lib/python2.4/site-packages/ISPManCCP-0.0.1alpha1-py2.4.egg/ispmanccp/controllers/accounts.py',
> line 179 in edit_post
>   retval = update_user_info(user_dict)
> File
> '/usr/lib/python2.4/site-packages/ISPManCCP-0.0.1alpha1-py2.4.egg/ispmanccp/lib/ispman_helpers.py',
> line 158 in update_user_info
>   return asbool(g.ispman.update_user(cgi))
> PerlError: Can't call method "exists" without a package or object
> reference at /opt/ispman/lib/ISPMan/LDAP.pm line 518, <DATA> line 424.
> 
> Regards, Margusja
> 

I'm sorry to ask you this, but is it possible for me to have access to
the server where you have CCP installed?

I'm unable to reproduce the problem on my server, and everything appears
to be correct with your configuration.

If that's not possible, perhaps some more details, like:
 - which is your python version, 2.4.???(although this doesn't seem to
be the problem)
 - what are the perms of /opt/ispman, /opt/ispman/lib,
/opt/ispman/lib/ISPMan/
 - what's the user and group that is running the paster application?

While developing I've recursively chown'ed the /opt/ispman to the user
ispman and group ispman.
I also run paster like(and this is what I forgot to mention on README.txt):
 paster serve --daemon --user=ccp --group=ispman
- --log-file=/home/ccp/etc/ISPMAnCCP/ispmanccp.log
/home/ccp/etc/ISPMAnCCP/production.ini (start|stop)

but it could just be:
 paster serve --user=ccp --group=ispman
- --log-file=/home/ccp/etc/ISPMAnCCP/ispmanccp.log
/home/ccp/etc/ISPMAnCCP/production.ini

The last one would be outputting to the console. The important part is
the user/group, they should have read access the the
/opt/ispman/lib/ISPMan directory.

As a last resort try to run paster as root just to see if it's really a
permissions problem.

Regards,
- --
Pedro Algarvio
   __ ___  ___ _______        ___ __
|   Y   .'  _|   _   .-----.'  _|  |_   .-----.----.-----.
|.  |   |   _|   1___|  _  |   _|   _|__|  _  |   _|  _  |
|.  |   |__| |____   |_____|__| |____|__|_____|__| |___  |
|:  1   |    |:  1   |                             |_____|
|::.. . |    |::.. . |  ufs [AT] ufsoft [DOT] org
`-------'    `-------'    ufs [AT] sapo [DOT] pt
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFFZlbDniPxVTX2hA4RAtBuAJ4gUI/aTYACaDUDWXGv4dtS1VAMqQCgrc5v
FIwDIwhp0Bkdun6M1V3Sacg=
=i3r4
-----END PGP SIGNATURE-----

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV