403Webshell
Server IP : 167.235.67.158  /  Your IP : 216.73.216.95
Web Server : Apache
System : Linux ubuntu-8gb-nbg1-1 6.8.0-111-generic #111-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 11 23:16:02 UTC 2026 x86_64
User : root ( 0)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var//wordpress.sh
#!/bin/bash

SITE=$1
USER=$2
ROOT="/var/www/$SITE"

if [ -z "$SITE" ] || [ -z "$USER" ]; then
  echo "Usage: sudo /var/wordpress.sh sitename username"
  exit 1
fi

echo "==> Fixing permissions for: $ROOT"

echo "-> chown wp-content to $USER:$USER"
sudo chown -R $USER:$USER "$ROOT/wp-content"

echo "-> baseline perms (dirs 755, files 644) within wp-content"
find "$ROOT/wp-content" -type d -exec chmod 2775 {} \;
find "$ROOT/wp-content" -type f -exec chmod 664 {} \;

echo "-> making wp-content/uploads writable"
find "$ROOT/wp-content/uploads" -type d -exec chmod 2775 {} \;
find "$ROOT/wp-content/uploads" -type f -exec chmod 664 {} \;

echo "-> making wp-content/upgrade writable"
mkdir -p "$ROOT/wp-content/upgrade"
mkdir -p "$ROOT/wp-content/upgrade-temp-backup"

find "$ROOT/wp-content/upgrade" -type d -exec chmod 2775 {} \;
find "$ROOT/wp-content/upgrade" -type f -exec chmod 664 {} \;

find "$ROOT/wp-content/upgrade-temp-backup" -type d -exec chmod 2775 {} \;
find "$ROOT/wp-content/upgrade-temp-backup" -type f -exec chmod 664 {} \;

echo "Done."

Youez - 2016 - github.com/yon3zu
LinuXploit