Nov 21
If you have a server, but only want to allow users to copy files via sFTP without providing shell access. This can be done with rssh, a restricted shell for use with OpenSSH that allows only scp and/or sftp.
To install rssh
$ apt-get install rssh
By default rssh doesn’t allow anything, to allow only sftp modify the rssh.conf file.
$ nano /etc/rssh.conf
Uncomment the line for allowsftp and other transfer protocols you want to enable.
#allowscp
allowsftp
#allowcvs
#allowrdist
#allowrsync
To restrict a user to only allow sftp access, modify the /etc/passwd file
$ nano /etc/passwd
For example
ftp:x:100:100::/home/ftp:/usr/bin/rssh
Nov 16
To analyze my disk usage on my Windows computer I use TreeSize Free. But TreeSize doesn’t work on my Xubuntu system. To help me analyze disk usage on my Xubuntu system I use a graphic tool called Baobab. Baobab runs in any Gnome envirnoment, but will also work Xubuntu’s Xfce environment and is bundled in the gnome-utils package.

Install the gnome-utils package
$ apt-get install gnome-utils
Then add Baobab to the desktop Panel.
- Right click on the Panel
- Add New Item
- Select launcher
- For the icon enter
/usr/share/icons/hicolor/24x24/apps/baobab.png
- For Command enter
/usr/bin/baobab

Nov 04
Normally when I build a web application that connects to a MySQL database, I would place the mysql-connector-java-bin.jar file into the WEB-INF/lib of the web application.
However, when I deployed the application on Tomcat 5.5 on Ubuntu 8.04 I got an exception: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
I couldn’t find the reason which caused the exception, so I did a quick fix by placing the jar file into the Tomcat’s common lib directory.
$ cp mysql-connector-java-bin.jar /usr/share/java
$ cd /usr/share/tomcat5.5/common/lib
$ ln -s ../../../java/mysql-connector-java-bin.jar mysql-connector-java-bin.jar
Oct 28
RAR is a file format developed by Eugene Roshal, and one of the most popular format used for data compression and archiving next to the ZIP file format. By default, Ubuntu doesn’t have any support for extracting RAR files, however there is an available Linux freeware unrar for downloading.
To install unrar in Ubuntu
$ apt-get install unrar
The drawback with this utility is that it only supports the RAR and RAR2 format, but not the RAR3 format which can only be extract by RARLAB’s UnRAR which is not free.
Oct 21
Using apt-get is quickest and easiest way to manage Debian packages in Ubuntu. However, I would sometimes like to install the latest version of a package which is not available in the Ubuntu software repository. This can be done by downloading the Debian package (.deb) and using the dpkg command (which is what apt-get uses behind the scenes).
To install a .deb file
$ dpkg -i filename.deb
Other useful option available for dpkg:
Unpacks the file but does not install it
$ dpkg –unpack
Display configuration options are available for the package
$ dpkg –configure
Removes a package
$ dpkg –remove
To display the information for filename.deb
$ dpkg-deb –show filename.deb