Blog

Planned Changes

15:49:57
As usual I have changes planned again for the site. This time I will split the site up into a tech blog / online resume and a personal blog. I will also split off the photos, etc to the personal side and gear it more towards anime and my other life. I know this will come as big excitement to my one reader .... googlebot who seems to really like my site with his 400 spiders a month. :)

One day I do plan to make a login type system and then may implement comments, you know so googlebot can say whatsup every now and then! lol


FTP Upload Notifier

20:44:48
When a user logs into the ftp and uploads a file how do you know. There are different versions of ftp server software that provide this and proftpd probably has a script to do it, but I couldn't easily find one so I threw one together. This script runs as a cron every hour and checks the ftp folders. If a file has been uploaded or moved around it sends a notification or any trigger needed. For my purposes the ftp is used by customers to upload files, which our art department uses for printing. The art department needs to know as soon as files are placed and they then use the files and move them to a secondary location. This script uses some greps and egreps along with counts and checking modification times to decide when to send and when not to.

I had some problems initially with the way I was stopping search for a certain location after a file was initially uploaded. If files were uploaded sporadically then it wouldn't catch the later files only the first set, which I agree is a pure logic flaw.

My solution for this problem is obviously not the best way, but works great for this situation. The only flaw is that when the art department moves files around from their network shares of the ftp locations the modification times change and it sends an erroneous email on the next upload check. I couldn't think of a way to combat this easily so they just take that email as a job well done "HeHe".

I will attach the scripts shortly


New Additions

19:32:37
I have added a few different selections of work I have completed recently that might be of some interest to a select few.

HPasm on Debian

I was given a HP Proliant 320GL "I believe, will check." I needed to setup a ftp server to replace the current ftp server that resided there. The reason being that it was the companies main MS Exchange server and too important to have on the same server as ftp, which is inherently insecure. They were also not able to previously get passive ftp mode to work and as clients don't come with active by default it was a problem to explain to clients how to change. I got 7.04 Kubuntu setup and Proftpd but was not able to find a version of the HP advanced server management software that would run. It wasn't a big deal to not have the management software, but the server has huge fans and sounds like a rocket ship without the fan control software. I found a few sites that specifically with getting it working but none had explanation for the problems or solutions. I worked out a way to get it running and wrote a tutorial which is available here.

Securing Proftpd

This section is not completely finished yet. I had nightly seen multiple ips trying to brute force into the server assuming it had a default IIS ftp setup. They were trying multiple passwords but most of the time tried the username "administrator". I wrote a script that tracks the usernames and IP of each user trying to sign on and will add the user to iptables to drop all packets received if the user tries an invalid username or incorrect password more than a specified number of times. This script is not great and does have some problems, but it gives a good base to start from. It works fine so I have not rushed to finish it, but I hope to optimize it soon. It is available in the programming section.


MS Office Problems

02:00:38
Not like MS office itself is not enough of a problem. My colleague needed to create a spread sheet that each member of the company would contribute to. They would be adding info and a hyperlink to a file located on a network drive mapped to a local drive. The actual spreadsheet was located on a different mapped network drive. The problem is that for some reason MS Office pre-2007 has an issue where it tries to make the links relative to the location where the spreadsheet is stored. The drives are not all mapped uniformly, both network drives are on the same server and don't have mappings there. This causes Excel to not find the link and instead of just leaving it alone it decides to make a completely broken hyperlink. ../../../path/to/file/etc instead of P:/path/to/file. Maybe I am the only person to ever have suffered through trying to fix this, but Microsoft has little to no information about this. Well one KB article that did end up being the fix but finding that was like a needle in a haystack.

Relative hyperlinks in saved Office XP documents may not work as expected
http://support.microsoft.com/kb/886668

This still doesn't really fix the problem as all versions of office are affected not just 10. The registry entry they does fix the problem when properly applied however. I made a registry fix called hyperlinkfix.reg that will fix this problem in all semi recent versions of office 8, 9, 10, 11 on windows 2003, xp and 2000. This problem is completely resolved from what I can tell in office 2007 "office 11", but I have added it anyway since it will not hurt anything. I ended up having to push this registry fix through group policy to every box to resolve the problem fully. The reason is that if any box that doesn't have the fix opens the file, even if they make no hyperlink changes, once they save the spreadsheet will try to relate all hyperlinks and will break all existing hyperlinks.

Way to go Microsoft!!!