Initial commit
This commit is contained in:
20
quick/restore-perms.sh.example
Normal file
20
quick/restore-perms.sh.example
Normal file
@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
WP_CONTENT_DIRS=(
|
||||
plugins
|
||||
upgrade
|
||||
uploads
|
||||
)
|
||||
|
||||
export WEB_GID=33
|
||||
|
||||
perms() {
|
||||
sudo chown -R $UID:$WEB_GID "$1"
|
||||
find "$1" -type d -exec chmod g+rwx '{}' \;
|
||||
find "$1" -type f -exec chmod g+rw '{}' \;
|
||||
}
|
||||
|
||||
for DIR in "${WP_CONTENT_DIRS[@]}"; do
|
||||
perms "$SCRIPT_DIR/../wp-content/$DIR"
|
||||
done
|
Reference in New Issue
Block a user