0

I get the following when trying to allow httpd to write to application specific directories.

[xxx MISP]# chcon -t httpd_sys_rw_content_t /var/www/MISP/app/files
chcon: can't apply partial context to unlabeled file ‘/var/www/MISP/app/files’
Rui F Ribeiro
  • 55,929
  • 26
  • 146
  • 227
user286785
  • 1
  • 1
  • 1

2 Answers2

1

You need to add some rule with semanage for your app/files directory, and then apply with restorecon -Rv.

See detailed explanations in this article (especially section about using httpd_sys_rw_content_t): Configuring SELinux Policies for Apache Web Servers

U880D
  • 1,120
  • 10
  • 24
tonioc
  • 2,019
  • 13
  • 12
0

According other threads here on Unix Stackexchange: "chcon: can't apply partial context to unlabeled file '/usr/sbin/xrdp'" or "chcon: can't apply partial context to unlabeled file while installing nagios with SELinux", it seems that it is necessary to label the files using semanage and if there is SELinux in enforcing mode.

U880D
  • 1,120
  • 10
  • 24