Configuring and Using a Small Web Server

Kepas is a file transfer utility that lets you transfer files (or other contents such as Klipper or KNotes entries) to your friends. You can also use it to set up and monitor a small public file server. To use Kepas, install the kepas package with YaST or zypper. You can then either add Kepas as widget to your KDE 4 desktop or run Kepas from the system tray, both provide the same functions.

[Important]Security Considerations

When setting up a public file server with Kepas, there are no access restrictions to shared files. Whatever you select for sharing is available to anyone.

Before doing so, check with your system administrator whether your company's security policies allow to set up a public file server. Also in a private environment, you should only set up a public file server if your network is protected by an outer firewall. Otherwise you risk accidentally leaking sensitive information to the Web.

In addition to that, any Web server is a potential target for hackers.

Kepas is designed to be used for sharing files with friends, not to act as a fully-fledged Web server like Apache. Kepas is the successor of kpf that was primarily conceived as an easy way to share files with others while chatting on IRC (Internet Relay Chat, or chat rooms).

Procedure 5.3. Setting Up a Public File Server with Kepas

To add Kepas to your system tray, press Alt+F2 and enter kepas. If you want to add a Kepas widget to your desktop instead, proceed as outlined in Procedure 3.2, “Adding Widgets to the Desktop”.

  1. To set up a file server, left-click the Kepas widget (or right-click the Kepas icon in the system tray) and select Public Server+New Server.

  2. Specify the directory containing the files you want to share then click Next. Typically the public_html folder in your home directory is designed for that purpose.

    [Important]Public Availability of Sensitive Information

    When sharing a directory, all files in the directory and its subdirectories are made publicly available, including hidden files (files that start with a dot) and symbolic links.

    Be careful not to share sensitive information, such as passwords, cryptographic keys, your address book, or documents private to your organization. Make sure that any symbolic links included do not point outside your published folder, because that would give others access to areas of your system that are not intended for public viewing.

  3. You can keep the default values for the Listening Port, the Bandwith Limit and the Server Name in the next steps (they can also be altered later, if needed).

  4. Click Finish to publish the availability of the newly created file server in the network.

To make a file available to people with whom you are chatting online, just copy the file into your public_html folder and announce to those listening that your file is now available at http://servername:8001/filename (rather than sending them each an e-mail with the file attached).

To display an overview of all contents published on your public file server, the others only need to enter the following URL into their browsers: http://servername:8001.

Figure 5.10. Published Contents

Published Contents

To revoke the public file server, right-click the system tray icon (or left click the Kepas widget) and select File Server+Configured Server+Remove. If you want to change the file server settings (like port, bandwith limit, server name or if to follow symbolic links or not), instead select File Server+Configured Server+Settings from the context menu to access the configuration dialog.