Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Fri Feb 01, 2013 8:37 am 
Offline
Junior Member

Joined: Fri Dec 21, 2012 8:35 am
Posts: 31
I was using Olly Connelly's VPSBible to get started as a newbie, he gives you this script to tighten up your security, so when you need to install a plugin you run wpupgrade from the console and when you are done you run wpsafe. I am no linux/wp security guy, so I just trust that it is of value so I use it. However, I do not know how to get the function to work for multiple domains.

I ran the script for domain1.com, then domain2.com, then domain3.com thinking it would add each domain to the function, but instead it replaces the previous with the last... can anyone tell me how I can get the function to operate multiple domains at the same time?

Code:
### Edit the 2 values first, then post the whole lot. 
#
export DOMAIN="yourblog.com"
export USER="vpsUsername"
#
echo '
#########################
### WordPress 'chown' ###
#########################
## Allow WordPress Upgrades/Plugin Installs
alias wpupgrade="sudo find /home/USERNAME/public_html/DOMAIN/public/wp-admin -exec chown -R www-data:webmasters {} \; && sudo find /home/USERNAME/public_html/DOMAIN/public/wp-content -exec chown -R www-data:webmasters {} \;"
## Revert to Safe WordPress Ownership
alias wpsafe="sudo find /home/USERNAME/public_html/DOMAIN/public/wp-admin -exec chown -R USERNAME:webmasters {} \; && sudo find /home/USERNAME/public_html/DOMAIN/public/wp-content -exec chown -R USERNAME:webmasters {} \;"
' >> /home/$USER/.bashrc
sed -i "s/USERNAME/$USER/g" /home/$USER/.bashrc
sed -i "s/DOMAIN/$DOMAIN/g" /home/$USER/.bashrc
source /home/$USER/.bashrc
source /root/.bashrc


Top
   
PostPosted: Sun Feb 10, 2013 3:33 pm 
Offline
Junior Member

Joined: Fri Dec 21, 2012 8:35 am
Posts: 31
bump


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group