0

We are switching from a rhel7 webserver to Ubuntu 18.04. We currently have SELinux with file context set. We typically use this command in our rhel7 box:

chcon -R -t httpd_sys_rw_content_t /var/www/html/

I am trying to get file context setup in our Ubuntu server for AppArmor. When I run the above command in Ubuntu I get:

chcon: can't apply partial context to unlabeled file 'filename'

I have read MANY things online, and all I get is I need to change the context to unconfined_u:object_r:httpd_sys_content_t:s0, or many variations of that, but I ALWAYS get the same result. I have even switched to SELinux and got the same result too.

This is my last blocker for getting this project completed and I have spent HOURS on this one issue. Maybe I have the whole idea of AppArmor wrong, but file context should still apply - right? How can I apply the context properly?

0 Answers0