Skip to content

Instantly share code, notes, and snippets.

@gregberger
Created August 28, 2015 11:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gregberger/497b44fb452188cbfb18 to your computer and use it in GitHub Desktop.
Save gregberger/497b44fb452188cbfb18 to your computer and use it in GitHub Desktop.
Some symfony helpers to put in the .proifle file in *nix systems
export HTTPDUSER=`ps aux | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1`
## SYMFONY UTILS (beware, commands are relative to the root directory of a symfony project)
alias setupPermissions='sudo chmod +a "$HTTPDUSER allow delete,write,append,file_inherit,directory_inherit" ./app/cache ./app/logs && sudo chmod +a "`whoami` allow delete,write,append,file_inherit,dir ectory_inherit" ./app/cache ./app/logs'
alias cc='php app/console cache:clear'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment