Friday, March 16, 2007

Logwatch support for ProFTPD

Sorry to make my first post in two weeks be a boring technical one, but I've been too busy to let my mind ponder the vagaries of the universe lately.

I use LogWatch on a Linux box to keep me up to date on the previous day's hacking attempts, disk usage, backup status, and so on.It includes a module for use with ProFTP, the FTP server, but it never worked right. I tooled around Google for a while trying to find a version that worked, but only found others looking for the same thing with no solution. So I took matters into my own hands and updated the filter to correctly parse current ProFTP message log files.

A lot of this is untested, but the corrections mostly involved what seemed to be a pretty simple change in the the log format from whenever the script was originally created. I also added some code to summarize "unmatched" entries rather than spewing out every single one of them so my logwatch emails won't be gigantic if I missed something... If anyone uses this script and finds that it doesn't properly parse anything, post a comment or send me an email with a copy of any offending log entries, and I'll update the filter.

Download proftpd-messages

On my Fedora box this is /etc/log.d/scripts/services/proftpd-messages. I also added an option to "summarize unmatched entries" which means that if the script can't figure out what to do with a log entry, instead of copying every unmatched line (of which there might be a lot, if there was a hacking attempt or other repeated error of some kind that isn't handled yet by the script) into the logwatch message, it will summarize the "unmatched" entries the same as any other one that is recognized. To enable this, set:

$ftpd_ignore_unmatched = 2

in /etc/log.d/scripts/services/proftpd-messages.conf

Update 3/21/2007: I fixed a few bugs and added support for some more messages that weren't handled by the old script. The current version is now at the link above.

Also, in an exchange with the current developer of this script on the logwatch-devel list, I suspect that the problems with this script have to do with operating system. He is running on Solaris and the log format that his installation of ProFTPD produces remains consistent with the "old" version of the script. So, chances are, this script will be good for Linux but maybe not for other *nix variants such as Solaris. The next official release will likely be capable of handling either format log file, though.

Update 3/27/2007: The original changes I made have been committed to the CVS, so the latest version will work for either log format. I have a few other additions that I need to extract from this version, but consider the CVS version better at this point.

Friday, February 23, 2007

File sharing doesn't hurt music sales

A new study demonstrates statistically that the effect of file sharing on music sales is negligible, despite the recording industry's claims of staggering losses as a result of digital music swapping. This is the first hard evidence of my own long-held belief that attempting to restrict free exchange of copyrighted digital property (be it music or software) is not only ineffective, but in probably even counterproductive.

There has been a real drop in music sales in the last few years, a fact which the music industry has often pointed towards as proof of the impact of P2P file sharing. The author suggests several possible explanations of this trend, which are reasonable, although it does not attempt to analyze this side of the equation in detail.

There are other costs that are not even accounted for in this study. The entertainment industry has undoubtedly spent staggering sums of money on developing and implementing copy-protection schemes for music and video. This real cost is of course built into the price of every CD, DVD and DVD player you buy. Windows Vista includes DRM code at every layer of its functionality, at the behest of the entertainment industry. Every modern TV and DVD player must include circuitry whose only purpose is to manage encrypted digital information. All these technologies, which add no value to the consumer, impact the bottom line when you buy something -- and in some cases, the complexity of the technology causes things to just not work even when used in a perfectly legal manner.

Another consideration is that DRM reduces the value of music purchased online, by restricting its utility, which certainly has an effect on sales as well. Finally, the RIAA continues to file thousands of lawsuits on the basis of their so-called losses, again at great expense not just to the recording industry, but to society as these essentially frivolous suits must be brought to trial. This also comes back as a real cost; and since suing your own customers is akin to biting the hand that feeds you, there is certainly an impact from the ill will generated by these actions.

These other factors are probably difficult to quantify, but taken with the hard data presented in this study, it is clear that the ongoing fight against "piracy" of this kind is not just ineffective, but probably actually harmful to the industry. It will be a great day when the entertainment industry starts focusing it's resources on actually entertaining again.

Thursday, February 22, 2007

Heroes


Sometimes you gotta just love the news. In "Sword seized after man mistakes porn for rape," we read the story of James Van Iveren, resident of Oconomowoc, Wisconsin, who charges into his neighbor's apartment after hearing screams that he believed to be a woman crying for help. Actually, he heard his neighbor's porn video.

This is so deliciously lurid. CNN, in a sidebar, bullets out the story highlights:

  • James Van Iveren says he feels "stupid" after breaking into neighbor's apartment
  • Neighbor says Van Iveren held him at sword-point, demanding proof he was alone
  • Neighbor says he played part of the pornographic movie for police
  • Van Iveren charged with criminal trespass, criminal damage, disorderly conduct

You really can't make this kind of stuff up. But at the same time, where's the human interest here? This is cast as News of the Weird, and surely it qualifies. But I believe James Van Iveren is a true American hero. This is a man who ran to the aid of what he believed was another human being in peril, with no regard for his own safety or the possible consequences of his actions. Instead of raising him up as in icon of the good that can be found in humanity, he is being slapped with a bunch of criminal charges.

There is very little doubt, in my reading of this story, that Iveren acted in good faith, even if he does look like a serial killer. Yet instead of forgiving him for what appears to be an honest mistake, the outcome just reinforces that people should mind their own business and not get involved. The absurdity of the story on the surface belies the truth: we are a society that increasingly mistrusts itself, and punishes altruism.

Then again, maybe he's just crazy as a crack-house rat.

Wednesday, February 21, 2007

One Nation Under God

I was listening to this story on NPR yesterday morning and was struck by a comment that one of the interview subjects made, related to GOP values. She says we need to "..stick to the basic issues of the family. Do away with abortion and the gay business. We are one nation, founded on God."

Coincidentally, I am reading Richard Dawkins' The God Delusion and had just read a chapter that directly addressed this notion. This country was not, in fact, founded on (or under, or inside, or anywhere to do with) God. Who has never heard of the notion of separation of church and state? The first amendment to the U.S. Constitution reads that "Congress shall make no law respecting an establishment of religion, or prohibiting the free exercise thereof." In 1797, in a treaty with the Muslim nation of Tripoli, George Washington wrote "As the Government of the United States of America was not, in any sense, founded on the Christian religion..."

Our president is a born-again Christian. He has been often quoted as receiving guidance from God, believing that God speaks through him. While a handful of different religions are represented in our senate, there is not a single atheist in the U.S. Senate - and the vast majority are protestant Christian - despite the fact that 15% of the U.S. population describing themselves as secular or atheist in the 2001 census.

This country was founded as a free country, not a doctrined one. But it looks like we were more enlightened two hundred years ago than we are today as far as freedom of thought goes. The biggest legislative issues in our country are exactly about religion - gay rights and marriage, abortion, evolution. The founding fathers enacted a treaty with a Muslim nation in 1797 that affirmed our lack of prejudice against any religion. Today, prejudice against non-Christian or non-religious thought is practically mainstream thought in our country and our legislation.