3

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?

6

You just need to fix your typo.

You entered:

http_sys_content_t

But it is correctly:

httpd_sys_content_t
  • What's the difference between httpd_sys_content_t and httpd_sys_rw_content_t? Should I give the same selinux permissions to the ssl certificate directory (again not the default)? – a coder Dec 18 '15 at 19:51
  • 1
    One is read only, one is read-write. – Michael Hampton Dec 18 '15 at 19:53
  • And, whenever possible, you should use the default directories. It will save you a lot of trouble later. – Michael Hampton Dec 18 '15 at 19:54
  • What is there a default ssl certificate directory in EL7? – a coder Dec 18 '15 at 19:55
  • 1
    The directories under /etc/pki/tls. – Michael Hampton Dec 18 '15 at 19:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.