We are using the Odoo recruitment module and we we have CVs attached to applicants. When trying to access certain CVs this error keeps appearing:
OSError: [Errno 2] No such file or directory: '/opt/odoo/.local/share/Odoo/filestore/ZHRPM/2d/2d2955a5544e09c59860478be67a5ab5b5aac6f4'
along with the Traceback. This appears to be completely random.
Going through the logs, we came across this:
Traceback (most recent call last):
File "/opt/odoo/odoo/openerp/addons/base/ir/ir_attachment.py", line 135, in _file_write
with open(full_path, 'wb') as fp:
IOError: [Errno 13] Permission denied: u'/opt/odoo/.local/share/Odoo/filestore/ZHRPM/2d/2d2955a5544e09c59860478be67a5ab5b5aac6f4'
Has anyone come across this before? What might be the reason for this to occur? How can we resolve it?
Thanks in advance.
IOError and Permission denied errors usually come from the fact that an user does not have enough access rights on Ubuntu user level. Does your Ubuntu user that runs the Odoo process have enough rights to access/attach/download attachments?
Maybe still a little bit vague. The place where your filestore is kept (/opt/odoo/.local/share/Odoo/filestore) is probably restricted for the user where your Odoo process runs under in Linux.
It was my understanding that the location for the filestore is created by Odoo itself and that the Odoo user has full permissions to write and read files to it. Is this not the case? Are there instances that this might change? I did a 'ls al' command on the filestore and it appeared that some of the files and folders had root ownership and some had Odoo ownership. But this is not the case in our development servers, where all the files and folders have Odoo ownership.