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

10,004

You just need to fix your typo.

You entered:

http_sys_content_t

But it is correctly:

httpd_sys_content_t
Share:
10,004

Related videos on Youtube

a coder
Author by

a coder

SOreadytohelp

Updated on September 18, 2022

Comments

  • a coder
    a coder over 1 year

    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?

  • a coder
    a coder over 8 years
    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)?
  • Michael Hampton
    Michael Hampton over 8 years
    One is read only, one is read-write.
  • Michael Hampton
    Michael Hampton over 8 years
    And, whenever possible, you should use the default directories. It will save you a lot of trouble later.
  • a coder
    a coder over 8 years
    What is there a default ssl certificate directory in EL7?
  • Michael Hampton
    Michael Hampton over 8 years
    The directories under /etc/pki/tls.