Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

An attempt at a shell script to set correct directory/file permissions.

  • Loading branch information...
commit 23b06e103ee9f279749a52773d12351de1d27a30 1 parent 0128101
Jeremy Kendall authored
Showing with 23 additions and 0 deletions.
  1. +23 −0 bin/default-permissions
View
23 bin/default-permissions
@@ -0,0 +1,23 @@
+#!/bin/sh
+echo "This command uses chown and chmod. You may need to use sudo"
+
+echo "Your username: "
+read USERNAME
+
+echo "Apache username: "
+read GROUPNAME
+
+chown $USERNAME:$GROUPNAME db
+chown $USERNAME:$GROUPNAME logs
+chown $USERNAME:$GROUPNAME public
+chown $USERNAME:$GROUPNAME tmp
+
+chmod -R 775 db
+chmod -R 775 logs
+chmod -R 775 tmp
+
+chmod 775 public
+find public -type d -exec chmod 775 {} \;
+find public -type f -exec chmod 664 {} \;
+
+echo "Finished!"
Please sign in to comment.
Something went wrong with that request. Please try again.