Search code examples
odooodoo-14odoo-15

Error when install Odoo15: directory not writable


I just installed odoo15, but when I tried to start it, I get "Internal Error Message", and I get the follwing message from log file:

return self.app(environ, start_response)
File "/opt/odoo/odoo/http.py", line 1464, in dispatch
explicit_session = self.setup_session(httprequest)
File "/opt/odoo/odoo/http.py", line 1345, in setup_session
session_gc(self.session_store)
File "/opt/odoo/odoo/tools/func.py", line 26, in __get__
value = self.fget(obj)
File "/opt/odoo/odoo/http.py", line 1291, in session_store
path = odoo.tools.config.session_dir
File "/opt/odoo/odoo/tools/config.py", line 714, in session_dir
assert os.access(d, os.W_OK), \
AssertionError: /var/lib/odoo/sessions: directory is not writable - - -

How to fix this issues please

Thanks


Solution

  • Make sure you start odoo with the user that is able to write in this directory.

    My guess is that /var/lib/odoo/sessions is only writable by root. Did you create a new user for odoo?

    Try this (with odoo:odoo being the user and the group of your odoo system user):

    sudo chown -R odoo:odoo /var/lib/odoo
    

    Otherwise make also sure it IS writable:

    sudo chmod +w /var/lib/odoo/sessions