Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

1

Unable to install community modules : [Errno 13] Permission denied

By
Scott Ferguson
on 8/21/13, 2:33 AM 8,676 views

What am I doing wrong? Debian Squeeze with backports, postgresql 9.1.9-1~bpo60+1, python 2.6.6-8+b1, openerp 7.0-20130819-231103 Tried a number of different community modules including:- ;Australian and New Zealand States; Willow Australian and New Zealand Postcode Lookup ;Customize OpenERP web client. All have a number of different errors but share one:-

  File "/usr/lib/python2.6/shutil.py", line 142, in copytree
    os.makedirs(dst)
  File "/usr/lib/python2.6/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied:

OpenERP, postgresql, and python have been re-installed on clean VMs three times, and I've attempted to reinstall the same modules, in a different order each time - with the same result. No clues in the logs. Non-community modules install without error.

I've found the same problem reported several times on the old forums and elsewhere on the intertubes. In each case no answer has been given.

Australian and New Zealand States module errors:-

Server Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/openerp/addons/web/session.py", line 89, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/usr/lib/pymodules/python2.6/openerp/netsvc.py", line 292, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/usr/lib/pymodules/python2.6/openerp/service/web_services.py", line 626, in dispatch
    res = fn(db, uid, *params)
  File "/usr/lib/pymodules/python2.6/openerp/osv/osv.py", line 188, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/usr/lib/pymodules/python2.6/openerp/osv/osv.py", line 131, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/usr/lib/pymodules/python2.6/openerp/osv/osv.py", line 197, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/usr/lib/pymodules/python2.6/openerp/osv/osv.py", line 185, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/usr/lib/pymodules/python2.6/openerp/addons/base/module/module.py", line 682, in install_from_urls
    shutil.move(os.path.join(tmp, module_name), module_path)
  File "/usr/lib/python2.6/shutil.py", line 257, in move
    copytree(src, real_dst, symlinks=True)
  File "/usr/lib/python2.6/shutil.py", line 142, in copytree
    os.makedirs(dst)
  File "/usr/lib/python2.6/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/usr/lib/pymodules/python2.6/openerp/addons/base_aus_nz_states'

That looks like a file permissions error. You don't way which module is causing that error, or what the other errors are getting .. they may relate to that error you have shown us. You'll need to further investigate what/where the particular module is trying to write to.

Ian Beardslee
on 8/21/13, 2:45 AM

Thanks Ian, I'd named three of the modules in question. I've just added the full traceback for one of the modules to the parent.

Scott Ferguson
on 8/21/13, 2:50 AM

Also .. where did you get Australian and New Zealand States; Willow Australian and New Zealand Postcode Lookup from? We could find those quite handy ourselves

Ian Beardslee
on 8/22/13, 6:52 PM
2
Ian Beardslee
On 8/22/13, 6:49 PM

It looks like OpenERP (specifically the openerp user that OpenERP runs as) can't write to /usr/lib/pymodules/python2.6/openerp/addons/base_aus_nz_states

For custom/non-standard modules (as in a module not supplied in the .deb), such as you have there, I put them in a different directory (eg /opt/openerp/addons) that the openerp user and/or group has permission to (read and) write to and update the addon_path in the config file.

Note that having the 'custom' addon files writeable by the openerp user is probably not the best/sanest thing to do, but for our internal dev process that works quite well and we'll need to re-examine the process down the track.

Ian Beardslee
on 8/22/13, 6:54 PM
0
Jim Tzimas
On 10/31/13, 9:19 PM

We try to install the google_api from within Apps installation menu with the same error.

OSError: [Errno 13] Permission denied: '/usr/lib/python2.6/site-packages/openerp-7.0_20131009_231130-py2.6.egg/openerp/addons/google_api'

OpenERP Server Error Client Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/openerp-7.0_20131009_231130-py2.6.egg/openerp/addons/web/http.py", line 204, in dispatch response["result"] = method(self, *self.params) File "/usr/lib/python2.6/site-packages/openerp-7.0_20131009_231130-py2.6.egg/openerp/addons/web/controllers/main.py", line 1132, in call_button action = self._call_kw(req, model, method, args, {}) File "/usr/lib/python2.6/site-packages/openerp-7.0_20131009_231130-py2.6.egg/openerp/addons/web/controllers/main.py", line 1120, in _call_kw return getattr(req.session.model(model), method)(args, **kwargs) File "/usr/lib/python2.6/site-packages/openerp-7.0_20131009_231130-py2.6.egg/openerp/addons/web/session.py", line 42, in proxy result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args, kw) File "/usr/lib/python2.6/site-packages/openerp-7.0_20131009_231130-py2.6.egg/openerp/addons/web/session.py", line 30, in proxy_method result = self.session.send(self.service_name, method, *args) File "/usr/lib/python2.6/site-packages/openerp-7.0_20131009_231130-py2.6.egg/openerp/addons/web/session.py", line 103, in send raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)

Server Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/openerp-7.0_20131009_231130-py2.6.egg/openerp/addons/web/session.py", line 89, in send return openerp.netsvc.dispatch_rpc(service_name, method, args) File "/usr/lib/python2.6/site-packages/openerp-7.0_20131009_231130-py2.6.egg/openerp/netsvc.py", line 292, in dispatch_rpc result = ExportService.getService(service_name).dispatch(method, params) File "/usr/lib/python2.6/site-packages/openerp-7.0_20131009_231130-py2.6.egg/openerp/service/web_services.py", line 626, in dispatch res = fn(db, uid, params) File "/usr/lib/python2.6/site-packages/openerp-7.0_20131009_231130-py2.6.egg/openerp/osv/osv.py", line 188, in execute_kw return self.execute(db, uid, obj, method, *args, *kw or {}) File "/usr/lib/python2.6/site-packages/openerp-7.0_20131009_231130-py2.6.egg/openerp/osv/osv.py", line 131, in wrapper return f(self, dbname, args, *kwargs) File "/usr/lib/python2.6/site-packages/openerp-7.0_20131009_231130-py2.6.egg/openerp/osv/osv.py", line 197, in execute res = self.execute_cr(cr, uid, obj, method, args, *kw) File "/usr/lib/python2.6/site-packages/openerp-7.0_20131009_231130-py2.6.egg/openerp/osv/osv.py", line 185, in execute_cr return getattr(object, method)(cr, uid, args, *kw) File "/usr/lib/python2.6/site-packages/openerp-7.0_20131009_231130-py2.6.egg/openerp/addons/base/module/module.py", line 682, in install_from_urls shutil.move(os.path.join(tmp, module_name), module_path) File "/usr/lib64/python2.6/shutil.py", line 257, in move copytree(src, real_dst, symlinks=True) File "/usr/lib64/python2.6/shutil.py", line 142, in copytree os.makedirs(dst) File "/usr/lib64/python2.6/os.py", line 157, in makedirs mkdir(name, mode) OSError: [Errno 13] Permission denied: '/usr/lib/python2.6/site-packages/openerp-7.0_20131009_231130-py2.6.egg/openerp/addons/google_api'

**We also found a WALL in the Backup Database with same error. We have root access in a VM of ours but we don't know if we should force OPENERP to run as a different user. Do you suggest smthng like that? Would it be wise to give openerp user full access? And if so which is the process to do so?

THANKS in advance everyone for any help!**

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 8/21/13, 2:33 AM
Seen: 8676 times
Last updated: 7/1/16, 1:33 PM