Skip to content
joeguilmettePublic

About

Simple script to set permissions and shell settings before and after a Wordmove push/pull

Resources

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

#Safely using Wordmove with www-data Web server uses www-data? Want to use ssh with www-data without exposing your server to attack? This script will give www-data a bash shell so you can do you business, and then it will close it right back up. It'll even fix all your permissions in /var/www.

#Clone script $ git clone git@github.com:joeguilmette/lockdown.git ~/lockdown

$ sudo mv ~/lockdown /etc/lockdown

If you get a Permission denied (publickey), you need to add your ssh-key to githubg.

#Make in runnable $ export PATH="$PATH:/etc/lockdown"

$ sudo chmod u+x /etc/lockdown/lockdown.sh

$ alias lockdown='sudo /etc/lockdown/lockdown.sh'

$ alias openitup='sudo usermod -s /bin/bash www-data'

#Add a crontab Just in case you forget to run $ lockdown after finishing your Wordmove, we can automate the lockdown process with crontab.

$ sudo crontab -e

Add */30 * * * * /etc/lockdown/lockdown.sh to the bottom. This will run lockdown every 30 minutes.

#Usage

  • Allow www-data to have a Bash shell for rsync purposes $ openitup

  • Rsync your files to /var/www $ wordmove push --all

  • Lockdown your server $ lockdown

About

Simple script to set permissions and shell settings before and after a Wordmove push/pull

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages