You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
370 B
20 lines
370 B
#!/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
|