[TriLUG] OT: Disinfecting a Club's Website

Aaron Schrab aaron at schrab.com
Mon Aug 19 21:28:38 EDT 2013


At 21:11 -0400 19 Aug 2013, Alan Porter <porter at trilug.org> wrote:
>Just "git init" and "git add *" and "git commit -m 'initial copy'" to
>get started.  Then when you think your files have been hacked,
>you can "git diff" to see, and "git checkout *" to revert back to
>the good copies.

I'll second that thought, and add that when doing that in a directory 
that's accessible via a web server I like to include something like
`--separate-git-dir=/path/outside/webroot/website.git`  to the git init 
command.  That way I don't unintentionally provide access to the entire 
repository, including all of the history, to anybody who decides to try 
cloning the web site's URL.  Sure it's unlikely to happen, and wouldn't 
be a big problem for a public site; but it's an easy thing to do to add 
a little bit of security.


More information about the TriLUG mailing list