Odoo Help


File not found error when trying to access attachment

on 8/12/15, 8:38 AM 1,752 views

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?

on 8/12/15, 10:47 AM

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.

on 8/12/15, 10:49 AM

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.

on 8/12/15, 11:55 PM
Green Board Company
On 4/27/17, 6:07 PM

This is due to user permission of the user which runs odoo server, usually the user is "odoo".

You need to change the owner of the filestore folders

1) Check if odoo user is the owner:

user@HOST:~# sudo cd /var/lib/odoo/.local/share/                          
user@HOST:/var/lib/odoo/.local/share# sudo ls -la
total 12
drwx------ 3 root root 4096 Sep 22 2016 .
drwx------ 3 root root 4096 Sep 22 2016 ..
drwx------ 5 root root 4096 Apr 26 18:06 Odoo

2) Change the folder owner to proper user

user@HOST:/var/lib/odoo/.local/share# chown -R odoo: /var/lib/odoo

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 8/12/15, 8:38 AM
Seen: 1752 times
Last updated: 4/27/17, 6:07 PM