Thursday, August 19, 2010

Stop Thinking Like a UNIX-tard

Ok, so, I wanted to transfer an installation package from my system at work to my system at home, but didn't want to ass around with setting up trusted SSH keys. So, what do I do? I try to email the file.

Now, mind you, this was s 36MB MSI file. I knew that GMail had less restrictions on file sizes, so, I figured, "mail it to myself". Gmail apparently sets a 25MB filesize limit. "Hmm... What to do," says I.

AH! I've got Cygwin installed both on the system the MSI's sitting on and my laptop. I'll just split the file up into manageable chunks and email myself the chunks:

  1. Take an md5sum of the source MSI
  2. do a quick `split -d -b 12582912 MgtUI.msi MgtUI-chunk`
  3. Email myself the md5 and the first chunk in one email, then the other two chunks as separate emails
  4. Flip back to my laptop and fire up gmail
  5. Download the sent files
  6. Discover that Windows has saved the files with a permissions mask that Cygwin interprets as 0000.
  7. Use the security editor to set the file permissions on each file, individually to something that Cygwin will accept
  8. `cat` the chunks together
  9. Run an md5sum on the reconstituted MSI and verify it all came through ok
  10. Run the installer

I'm thinking I could probably have gen'ed a DSA-2048 key and set it up as an authorized key, SCPed the file across and installed it in well less than the time it took to do the prior ten steps. Oh well... There's about a bajillion ways to skin a cat. My UNIX-tard brain made me do it one of the more painful ways.

No comments:

Post a Comment