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?

0

1 Answer 1

8

You just need to fix your typo.

You entered:

http_sys_content_t 

But it is correctly:

httpd_sys_content_t 
5
  • 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)? Commented Dec 18, 2015 at 19:51
  • 1
    One is read only, one is read-write. Commented Dec 18, 2015 at 19:53
  • And, whenever possible, you should use the default directories. It will save you a lot of trouble later. Commented Dec 18, 2015 at 19:54
  • What is there a default ssl certificate directory in EL7? Commented Dec 18, 2015 at 19:55
  • 1
    The directories under /etc/pki/tls. Commented Dec 18, 2015 at 19:56

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.