ValueError:typeshttp_sys_content_t无效,必须是文件或设备types

我需要在一个非默认的httpd目录下设置selinux权限: /www/virtualhosts/site01 ,等等。

所以我问:

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

并得到:

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

configurationselinux与我的非默认httpd目录一起工作需要做什么?

你只需要修复你的错字。

你login了:

 http_sys_content_t 

但是这是正确的:

 httpd_sys_content_t