Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

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 pedrocifuentes/7785746 to your computer and use it in GitHub Desktop.
Save pedrocifuentes/7785746 to your computer and use it in GitHub Desktop.
#!/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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment