Google Chrome 2.0 Early Access Version Is Here

Posted on in Categories Linux desktop, Mozilla, News, OS X, UNIX, Windows, windows vista last updated January 9, 2009

Google Chrome is a web browser developed by Google and based on the WebKit layout engine and application framework. On January 08, 2009 Google introduced a new release channels system, and now there are three distinct release channels – Stable channel, Beta channel, and Developer preview channel.

Google has released Chrome 1.0 on Dec – 2008, and now the company is all set to release version 2.0 (pre – beta version) of its web browser. From the release notes:

New version of WebKit. WebKit is the open source code Google Chrome uses to render web pages (HTML and CSS). 1.0.154.36 used basically the same version of WebKit as Safari 3.1, but the WebKit team has made a lot of improvements since that was released. 156.1 uses WebKit version 528.8 or, more precisely, revision 39410 from the WebKit source tree. In addition to fixing bugs and enabling features like full-page zoom and autoscroll, the new version also enables some nifty CSS features.

New network code. Google Chrome now has its own implementation of the HTTP network protocol (we were using the WinHTTP library on Windows, but need common code for Mac and Linux). We fixed a few bugs in HTTP authentication and made Google Chrome more compatible with servers that reply with invalid HTTP responses. We need feedback on anything that’s currently broken, particularly with proxy servers, secure (https) sites, and sites that require log in.

Look like the Mac and Linux versions of Chrome are getting closer. Are you going to switch to Google Chrome under Linux?

mod_secdownload – Lighttpd Create Secure Download Area with Unique Download URL

Posted on in Categories FreeBSD, Howto, lighttpd, Linux, Security, Sys admin, Tips, UNIX last updated April 15, 2008

Lighttpd handle secured download mechanisms using mod_secdownload modules. It uses the lighttpd webserver and the internal HTTP authentication using secrete password. This module use the concept called authenticated URL for a specified time. Each unique url remains valid for a specified time.

Your application has to generate a token and a timestamp which are checked by the webserver before it allows the file to be downloaded by the webserver.

URL Format

The generated URL has to have the format:

<uri-prefix>/<token>/<timestamp-in-hex>/<rel-path>

Which looks like
http://theos.in/dl/6262df3adba2bc85846e05440fcc3895/4804f986/file.zip

is an MD5 of

  • a secret string (user supplied)
  • <rel-path> (starts with /)
  • <timestamp-in-hex>

Understanding filesystem layout

  • Domain name: theos.in
  • Webroot : /home/lighttpd/theos.in/http/
  • Download location : /home/lighttpd/download-area/ (you must upload all download files here)
  • Download url : http://theos.in/dl/<token>/<timestamp-in-hex>/file.zip

Make sure /home/lighttpd/download-area/ directory exists:
# mkdir -p /home/lighttpd/download-area/
# chown lighttpd:lighttpd /home/lighttpd/download-area/

Configuration

Open lighttpd.conf file:
# vi /etc/lighttpd/lighttpd.conf
Append following configuration:

secdownload.secret          = "MySecretSecurePassword"
secdownload.document-root   = "/home/lighttpd/download-area/"
secdownload.uri-prefix      = "/dl/"
secdownload.timeout         = 3600

Where.

  • secdownload.secret : Your password; it must not be shared with anyone else
  • secdownload.document-root : Download file system location, must be outside domain webroot / documentroot
  • secdownload.uri-prefix : url prefix such as /dl/ or /download/
  • secdownload.timeout : Set timeout for each unique url in seconds

Save and close the file. Restart lighttpd:
# service lighttpd restart

Sample PHP Download Script

<?php
$secret = "MySecretSecurePassword";
$uri_prefix = "/dl/";
 
# set filename
$f = "/file.zip";
 
# set current timestamp
$t = time();
$t_hex = sprintf("%08x", $t);
$m = md5($secret.$f.$t_hex);
# finally generate link and display back on screen
printf('<a href="//www.cyberciti.biz/">%s</a>',$uri_prefix, $m, $t_hex, $f, $f);
?>

410 Gone HTTP Error Code

After timeout; unique url will be gone and end user will get 410 http status code. It indicates that the resource requested is no longer available and will not be available again. So if anybody deeplinked or hotlinked your content it will be gone after timeout.

Further readings:

nixCraft FAQ Roundup May 29, 2007

Posted on in Categories FAQ last updated October 30, 2008

Recently updated/posted Linux and UNIX FAQ (mostly useful to Linux/UNIX new administrators or users) :

Enjoy!

Linux wget: Your Ultimate Command Line Downloader

Posted on in Categories CentOS, Debian Linux, FreeBSD, Gentoo Linux, Howto, Linux, Linux desktop, Networking, RedHat/Fedora Linux, Shell scripting, Solaris, Suse Linux, Sys admin, Tips, Tuning, Ubuntu Linux, UNIX last updated September 12, 2010

It is a common practice to manage UNIX/Linux/BSD servers remotely over the ssh session. You may need to download download the software or other files for installation. There are a few powerful graphical download manager exits for Linux and UNIX like operating systems: