Skip to content

Instantly share code, notes, and snippets.

@starlightsys
Last active August 29, 2015 14:16
Show Gist options
  • Save starlightsys/1515dfedd21a82919f1f to your computer and use it in GitHub Desktop.
Save starlightsys/1515dfedd21a82919f1f to your computer and use it in GitHub Desktop.
Set correct SELinux labels and booleans for eZ Publish. Works with eZ Community 2014.07.
#!/bin/bash -x
if [ "$EUID" -ne 0 ]
then echo "Must be run as root."
exit
fi
setsebool -P httpd_anon_write 1
setsebool -P httpd_sys_script_anon_write 1
for d in $(echo "ezpublish/cache,ezpublish/logs,ezpublish/config,ezpublish_legacy/design,ezpublish_legacy/extension,ezpublish_legacy/settings,ezpublish_legacy/var,web" | tr "," "\n"); do
semanage fcontext -a -t public_content_rw_t "/var/www/html/ez/$d(/.*)?"
done
restorecon -F -R -v /var/www/html/ez
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment