Last active
August 29, 2015 14:16
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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