Skip to content

Instantly share code, notes, and snippets.

@kbond
Created January 4, 2012 16:36
Show Gist options
  • Save kbond/1560845 to your computer and use it in GitHub Desktop.
Save kbond/1560845 to your computer and use it in GitHub Desktop.

Revisions

  1. kbond created this gist Jan 4, 2012.
    9 changes: 9 additions & 0 deletions fix_symfony2_permissions.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    #!/bin/sh

    USER=$(whoami)
    APACHE_USER=$(ps axho user,comm|grep -E "httpd|apache"|uniq|grep -v "root"|awk 'END {print $1}')

    sudo chmod +a "$USER allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs
    sudo chmod +a "$APACHE_USER allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs

    echo "app/cache & app/logs been properly chmod'ed for $USER and $APACHE_USER"