I did install some of my aspnet core apps on Linux before using CentOS8. This time I used CentOS8-Stream. I dont know if that contributes to the issue.
The facts:
I could not make apache use certificates. Everything was as I did before and yet it didnt work. Finally I found some obscure link on the internet which used
ls -lrtZ /etc/pki/tls/certs
to displaysecurity context
(I didnt even know it exists). So I simplycp
certificate files and it Apache is now fine.However my aspnet app fails with
attempt to write a readonly database
. I tried thecp
trick on it but wont help.. Also no application logs appear
The db file:
-rw-rw-rw-. 1 root root unconfined_u:object_r:httpd_sys_content_t:s0
I dont understand how this security context
can override regular chmod-like permissions?? And what to do to fix it? I mean how more explicit permission can get to be rwrwrw ?
Is it some new feature
of SELinux? Can I switch it off completely?
Note: 1 and 2 are not related - I just think they have same root cause but nothing in between them. If I access the aspnet app directly without Apache - it has the same error