ValueError: Type http_sys_content_t is invalid, must be a file or device type

a coder asked:

I need to set selinux permissions on a non-default httpd directory: /www/virtualhosts/site01, ect.

So I issue:

[mybox]# semanage fcontext -a -t http_sys_content_t "/www(/.*)?"

And get:

ValueError: Type http_sys_content_t is invalid, must be a file or device type

What needs to happen to configure selinux to work with my non-default httpd directory?

My answer:


You just need to fix your typo.

You entered:

http_sys_content_t

But it is correctly:

httpd_sys_content_t

View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.