Skip to content

Instantly share code, notes, and snippets.

@starlightsys
Last active August 29, 2015 14:16
Show Gist options
  • Select an option

  • Save starlightsys/1515dfedd21a82919f1f to your computer and use it in GitHub Desktop.

Select an option

Save starlightsys/1515dfedd21a82919f1f to your computer and use it in GitHub Desktop.

Revisions

  1. starlightsys revised this gist Feb 27, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion set_selinux_ez_policies.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    #!/bin/bash
    #!/bin/bash -x
    if [ "$EUID" -ne 0 ]
    then echo "Must be run as root."
    exit
  2. starlightsys revised this gist Feb 27, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion set_selinux_ez_policies.sh
    Original file line number Diff line number Diff line change
    @@ -6,6 +6,6 @@ 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(/.*)?"
    semanage fcontext -a -t public_content_rw_t "/var/www/html/ez/$d(/.*)?"
    done
    restorecon -F -R -v /var/www/html/ez
  3. starlightsys created this gist Feb 27, 2015.
    11 changes: 11 additions & 0 deletions set_selinux_ez_policies.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    #!/bin/bash
    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