SELinux and /opt/indico/cache


On my newly installed indico 2.2.7 I cannot access the drop-down menus on the page.
The indico.log has the following error:

2020-04-01 11:04:30,694  ERROR    2ee47a3a36dd4669  indico.flask              Uncaught Exception
Traceback (most recent call last):
  File "/opt/indico/.venv/lib/python2.7/site-packages/flask/", line 1949, in full_dispatch_request
    rv = self.dispatch_request()
  File "/opt/indico/.venv/lib/python2.7/site-packages/flask/", line 1935, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/opt/indico/.venv/lib/python2.7/site-packages/indico/web/assets/", line 62, in js_vars_global
    with open(cache_file, 'wb') as f:
IOError: [Errno 13] Permission denied: u'/opt/indico/cache/assets_global_2.2.7_2592361574.js'

I think that this has to do with SELinux. How do I setup SELinux to allow write access to /opt/indico/cache?

Thank you

I resolved the issue by following the instruction from:

Perhaps, the instruction on SELinux at:, could be augmented to include these two directories too

As we are setting up our production server, we are having some trouble with the SELinux setup when we follow the instruction from:
In particular, we are not able to make the (type indico_log_t) to work properly as the file type of the /opt/indico/log directory. If we make the file type for this directory httpd_log_t then everything works fine.
My question is: can indico_log_t be replaced by httpd_log_t or is it required by indico’s functionality?

best to try it out - that’s how I created the original selinux policy in the docs

We’ll try and see why we cannot make work.