How do I fix server site ownerships? They are all wacked out!
crankycronos posted this on Jun 20th 2007 under Ensim Fixes
From time to time, server site file ownerships get led astray. Especially when the server administrator has been in there tinkering, uploading, etc.
To fix that, just run this little bit of code, and you will be all good to go.
#!/bin/bash DOMAINS=`sitelookup -a domain` for i in $DOMAINS; do WP_USER=`sitelookup -d $i wp_user` chown -R $WP_USER:$WP_USER /home/virtual/$WP_USER/var/www/html chown -R $WP_USER:$WP_USER /home/virtual/$WP_USER/var/www/cgi-bin done
Enjoy!
