Installing and Uninstalling Packages and Activation and Deactivation of Daemons in Fonz fun_plug 0.5

German version of this tutorialAfter installing Fonz’ fun_plug (see tutorial on this), you will probably want additional packages or Daemons like NFS or Torrent.

The commands below are ONLY for fun_plug Version 0.5
Please check here for newer tutorials!



1. Packages

1.1. Preinstalled Packages

The main packages included in the fun_plug.tgz tarball (which was downloaded and installed during the installation of Fonz fun_plug) are:

  • Lighttpd – a lightweight HTTP server for hosting web pages on the NAS
  • OpenSSH – Secure Shell (which you already used to login to the NAS)
  • Mediatomb – a UPnP media server (alternative to the one provided by Conceptronic)
  • NTP – Network Time Daemon (to synchronize the NAS’ clock with accurate time servers on the Internet)
  • UNFS3 – user-space NFS server (a file server protocol which is often used by computers running Linux)
  • NFS-Utils – NFS server (requires kernel support like on the CH3SNAS)
  • RSync – efficient file transfer and synchronization utility

We have already used OpenSSH during the tutorial on installing fun_plug to log onto the CH3SNAS using ssh. In a moment we will use rsync.

1.2. Downloading packages

For you convinience, there is a script available from Uli which provides the functionality for downloading the additional packages by Fonz and Uli:

mkdir -p /ffp/pkg/
cd /ffp/pkg/
wget -O /ffp/pkg/
chmod a+x /ffp/pkg/
sh /ffp/pkg/

Or can do it manually in the following sections:

1.2.1. Downloading additional packages provided by Fonz

Downloading of the ffp packages
Downloading of the ffp packages
First make sure, you entered valid gateway & DNS servers in the CH3SNAS configuration (browser -> enter name or IP address of your CH3SNAS -> Setup -> LAN). Your CH3SNAS needs this information in order to access the Internet. You can fill in these values manually (e.g. by copying them from another computer) or by letting the CH3SNAS fetch them from your router using DHCP.

Login to your NAS using the ssh protocol (e.g. using PuTTY). See tutorial page for details on how to do this.

Download additional packages from fonz’ site using the “rsync” file transfer command. The the “.” at the end of the 3rd line is essential (Linux shorthand notation for the current folder):

mkdir -p /ffp/pkg/
cd /ffp/pkg/
/ffp/bin/rsync -av --delete .

Note that the packages are together over 120 MBytes, so it can take a while. After the last file you get some statistics and return to the command prompt.
This step results in roughly 100 packages being copied (as tarballs) to the folder /ffp/pkg/packages/.

1.2.2. Downloading additional packages provided by Uli

Many packages used in the tutorials on this site were created by Uli and are found in his repository. Before you execute the following commands, please make sure that you meet the prerequisites as described in the previous section.

Download additional packages from Uli’s site using the “rsync” file transfer command. Note: The “.” at the end of the 3rd line is essential (Linux shorthand notation for the current folder):

mkdir -p /ffp/pkg/
cd /ffp/pkg/
/ffp/bin/rsync -av --delete .

After the last file you also get some statistics and return to the command prompt. This step results in a few packages being copied (as tarballs) to the folder /ffp/pkg/additional/ and its subdirectories. See PACKAGES.txt for the available packages.

1.2.3. Downloading packages from other sources

Make sure, you trust the source of any package that you download: a malicious (or just buggy) package can cause your NAS to fail, cause loss of data or worse!

1.3. Package management

Package management is done by a program by fonz called “funpkg“. Typing “funpkg” on the command line lists the flags and options that it supports:

Copyright (c) 2008 Tobias Poschwatta <>
Install:   funpkg -i <packages...>
Reinstall: funpkg -I <packages...>
Upgrade:   funpkg -u <packages...>
Remove:    funpkg -r <packages...>
Other options:
  -D <path>  System root directory (default: /)

Important: once you start using funpkg to install Fonz’ packages, you have to complete the entire procedure described in this tutorial in one session.
In other words, once you proceed with any of the steps beyond this point, you have to complete all steps of the Package management part of this tutorial:

  • initial update for packages
  • install new packages,
  • save any configuration changes that you need to save for existing packages that will be upgraded,
  • upgrade existing packages, and (most important of all)…
  • do a chmod a+x on e.g. /ffp/start/

1.3.1. Initial package updating

After the Installation you need to upgrade the installed packages ”’before”’ installing new packages. This is especially important for the funpkg tool itself, as new packages may require new features in funpkg. This is done by the parameter -u for the funpkg-tool. It updates any installed packages, but doesn’t install new ones.

cd /ffp/pkg/
funpkg -u packages/funpkg*.tgz
funpkg -u packages/*.tgz
funpkg -u additional/*/*.tgz

Now you can proceed with the next steps.

1.3.2. Package installation

After a package has been downloaded (as a tarball or .tgz file), you can install it with by changing to the respective directory, e.g. /ffp/pkg/packages:

cd /ffp/pkg/packages
funpkg -i packagename.tgz

If you want to install a number of packages, you can simply add a list of packages to funpkg:

cd /ffp/pkg/packages
funpkg -i packagename1.tgz packagename2.tgz packagename3.tgz ...

If you want to install all packages in a folder, you can use “*” as a wildcard (all files ending with .tgz):

cd /ffp/pkg/
funpkg -i packages/*.tgz
funpkg -i additional/*/*.tgz

We recommend this route, although it should be done carefully (see below). The reason why Fonz recommends this route, rather than letting you install only what you want, is that some packages require other packages or updated versions of these packages to run correctly. Such dependencies are not automatically resolved by funpkg. Thus, for example, you can get into trouble if you update to the latest version of OpenSSH without updating the uclibc package (a library of utilities used by OpenSSH): if the SSH daemon fails to launch properly the next time you reboot the CH3SNAS, you will be “locked out”. Which in turn means that you cannot use PuTTY to login and fix the problem (Hint: Turn on Telnet before updating SSH).

The file /ffp/pkg/packages/MANIFEST.TXT contains a list of all the files installed by each package. You may want to have a look to get a feel for where all these roughly 20,000 files go.

1.3.3. Package configuration

During the installation, certain packages tend to add an ASCII file with configuration settings to the folder /ffp/etc/. This can be viewed from Windows using WordPad or a programming editor like NotePad++. The latter can edit ASCII files with the Linux end-of-line convention. Alternatively, you can use the Joe editor provided as one of these packages. Any modifications can obviously lead to “interesting” results, so be careful, especially with important daemons.

Some packages place example configuration files into folder /ffp/etc/examples/ instead of putting actual configuration files into /ffp/etc/. Such files are ignored by the application: you are expected to read them and copy them (possibly after renaming or even editing) to folder /ffp/etc/ yourself. Examples for a package called PHP as listed in the MANIFEST.txt:

drwxr-xr-x root/root         0 2008-05-29 13:00 ./ffp/etc/examples/
-rw-r--r-- root/root     45030 2008-05-29 13:00 ./ffp/etc/examples/php.ini-dist
-rw-r--r-- root/root     48619 2008-05-29 13:00 ./ffp/etc/examples/php.ini-recommended

1.3.4. Package updating

Note that the names of the tarball files for packages end in an (often elaborate) version number. When you use funpkg -i packagename.tgz to install a package, instead of the normal

Installing package lighttpd-1.4.19-4.tgz ...

you may thus get a response like

Skipping lighttpd-1.4.19-4.tgz (already installed)

if that exact version of Lighttpd is already installed. Or you may get

Skipping lighttpd-1.4.19-4.tgz (installed: lighttpd-1.2.3-4.tgz )

if an older (or newer) version is already installed.

You can force funpkg to install a different version (upgrade or downgrade) with the -u option:

root@NAS:/mnt/HD_a2/ffp/pkg/packages# funpkg -u rsync-3.0.3-1.tgz
Installing package rsync-3.0.3-1 ...
Removing package rsync-3.0.2-2 ...

You probably want to manually upgrade all the packages that were skipped during funpkg -i *.tgz. Again, this can be important because other installed packages may require this upgrade.

But please beware of a number of pitfalls:

  1. This may overwrite any changes you made to configuration files (probably in folder /ffp/etc/). So you may want to create a copy of these first.
  2. This may overwrite access privileges you made to files (particularly to the scripts that start daemons in folder /ffp/start/).

We will discuss the role of the -x flag below (when discussing how to enable/disable daemons) and now only concentrate on avoiding a very real pitfall which happens when you run

funpkg -u OpenSSH-versionnumber.tgz

If you look into MANIFEST.txt you find that it creates (or more precisely – overwites) a file called

-rw-r--r-- root/root       971 2008-07-29 16:30 ./ffp/start/

This would be fine if you don’t need to run the SSH server yet. The problem is that, after running funpkg -u for OpenSSH, a next reboot will not start the SSH daemon (server) and you will be locked out of funplug: PuTTY for example cannot connect using the ssh protocol unless there is a running SSH server. This server can only start with the -x (execute) bit on the file set. Remember that we set that bit for exactly this file in the fun_plug tutorial? So we now need to do that again after you have upgraded whatever packages needed upgrading but BEFORE you exit ssh (or worse reboot the CH3SNAS).

So, to ensure that the file will run when you reboot the CH3SNAS in the future:

chmod a+x /ffp/start/
ls -l /ffp/start/*.sh

This gives all users (a) the right to execute (x) the file /ffp/start/ (in particular it enables the fun_plug script to execute it on startup). The folder listing will include

-rw-r--r-- 1 root root  432 Jul 15 14:44
-rw-r--r-- 1 root root  229 Apr 24 20:16
-rwxr-xr-x 1 root root  971 Jul 29 16:30
-rw-r--r-- 1 root root  383 Aug 12 22:17
-rw-r--r-- 1 root root  169 Aug 12 22:17

If the entry for has 3 x-bits set, you have succeeded.

1.3.5. Package removals

If you want to (e.g. temporarily) disable execution of a server package, see the discussion on Daemons. To remove a package completely, use:

funpkg -r packagename.tgz

Again, some packages (like uclibc) may be needed to run other packages, so removing packages using funpkg is not foolproof. Fortunately, application packages which a non-expert is likely to be aware of because they do something for the end user (e.g. servers/daemons) are unlikely to be used by other packages.

Note that the dependency information can be found at the top of the /ffp/start/ files. The example (from the file /ffp/start/

# PROVIDE: sshd

suggests that you shouldn’t remove the LOGIN package because it is required to run the sshd (=OpenSSH) package.

2. Daemons

2.1. What are Daemons?

Many packages can be used as “”Daemons””, which are basically programs running in the background. E.g. lighttpd (a lightweight Web server) shows no output in the shell (e.g. in PuTTY) during its operation and should be started during the bootup-process.

Note that many daemon names end with d. So lighttpd is not a light tpd (whatever that would be), but a light http (protocol) d(aemon) with a few letters mashed together.

Every daemon that is capable of running in the background delivers a “starter file” which is located in /ffp/start/. These starter files are again simple scripts that control the startup and shutdown of the corresponding daemons.

Some starter files provide additional capabilities and options, which are displayed by simply invoking the starter file without any parameters. Copy and paste the following one line at a time, and try a few more:

cd /ffp/start
sh status
sh status

This works because starter files normally expect a “start” or “stop” parameter. Don’t try this trick with just any shell script: it may do something, because that is what it is there for.

2.2. Starting Daemons manually

You can start every daemon manually by executing

sh /ffp/start/ start

2.3. Stopping Daemons manually

You can stop every daemon manually by executing

sh /ffp/start/ stop

2.4. Permanent activation of Daemons

If you want to activate a Daemon permanently so that it gets executed during the bootup-process, you simply set the execution-right:

chmod a+x

To see which daemons really got started during the last boot, see the end of the ffp.log file (in the top folder of your Volume_1 share). It will contain lines like

* /ffp/start/ ...
Starting /ffp/sbin/sshd

for daemons that were started.

2.5. Permanent deactivation of Daemons

Deactivation of a Daemon (no automatic execution during bootup) is done as follows:

chmod a-x

To see which daemon really got started during the last boot, see the end of the ffp.log file (in the top folder of your Volume_1 share). It will contain lines like

* /ffp/start/ inactive
* /ffp/start/ ...
Starting /ffp/sbin/sshd

indicating which daemons were not started (like the telnet daemon) and which daemons were started (like the ssh daemon).

75 thoughts on “Installing and Uninstalling Packages and Activation and Deactivation of Daemons in Fonz fun_plug 0.5”

  1. Acually I’ve got a question about installing a package. I want to install sabnzbd, but inorder to do so I need to install Cheetah and there I encounter the first problem. The package won’t install.

    I’ve got the package at:

    When trying to install: /ffp/pkg/packages/ funpkg -i Cheetah-2.0.1.tar.gz

    the error message: FATAL: Cheetah-2.0.1.tar.gz: /ffp not found in package

    Any idea how to fix this problem?

  2. Well, have seen all the packages available in the /ffp/pkg/packages folder and havent found WOL (WakeOnLan) script (

    I think it is a very usefull package, so I am gonna try to compile it and add to the fonfunz package list. I finally found the way to do a secured web server and can execute also sh commands by cgi. Just need the appropiate command, and I could then boot up the required comp from NAS over LAN from WAN (Internet). I got also a WOL modem router (billion) but i think this will work for every config, and not just for expensive routers,

    If Uli plans to do this before i do, please, notice first. Cause i am not so used in linux, i may last a while.


  3. My DNS 323 is having Problems doing the DNS lookups, any ideas?

    1. Check if it gets a valid DNS from the DHCP-Request. Otherwise set the DNS-Server manually.


  4. My native DNS-320 UPnP server doesn’t display photos (.jpg) or play music files (.mp3) on my Samsung UN46B8000XF Television.

    I installed Fonz fun_plug 0.5 on my DNS-320, then downloaded and installed all the packages. I also followed the procedure and installed Twonkymedia Server 6 which works properly for photos, music & videos.

    I would like to try MediaTomb. Is there a step-by-step procedure for MediaTomb like the one I followed for Twonky?

    You guys are doing some wonderful work -Thanks

    1. It’s strange to me that ffp comes with mediatomb prepackaged, but yet, no howtos or guides to explain different configuration options, etc.

      I would like to use mediatomb on my dns-325 like I used to use it on my Linux Gentoo box…. using MySQL database. Have you found any documentation for mediatomb and the fun_plug setup?

          1. Is there a command that you need to input to start mediatomb or is it supposed to start automatically? When I try to access the mediatomb web interface through port 49152 i get a “Firefox can’t establish a connection to the server” message which makes me believe mediatomb isn’t running?

          2. Roy – you need to start the service before Mediatomb is running.

            You can do this with:

            sh /ffp/start/ start

            or check whether it’s already running using:

            sh /ffp/start/ status

            Remember, if you want it to start automatically each time the NAS boots you need to set:

            chmod a+x /ffp/start/

  5. I’ve been looking through the packages, is Cheetah avaiable for download?

  6. I am looking to install plone/zope on a dns-321 with fun_plug, any help would be appreciated!

  7. I have installed openVPN throu funpkg and copied some files i received from my provider Anonine. But I don’t understund the error i got. Is somthing missing in the package?

    root@NAS1:/mnt/HD/HD_a2/ffp/home/root# openvpn --client --config /ffp/etc/openvp
    n anonine.ovpn --ca /ffp/etc/openvpn/
    Options error: You must define TUN/TAP device (--dev)

    1. Sorry for being a newbie.. forgot a slash in the command line.
      But I still cant get it to run!? I have checked usr & pwd is correct

      Fri Jul 1 13:05:00 2011 AUTH: Received AUTH_FAILED control message
      Fri Jul 1 13:05:00 2011 TCP/UDP: Closing socket
      Fri Jul 1 13:05:00 2011 SIGTERM[soft,auth-failure] received, process exiting

  8. Small hint for D-Link DNS-323/maybe others as well:
    When I run the first wget command (section 1.2) it can’t reach/resolve “”:
    # wget -O /ffp/pkg/
    wget: bad address ‘’
    This depends on your internet connection, or provider.

    In my case it was enough to add DNS servers through Admin web interface. Go to Setup/LAN, and set following DNS servers (those are Google Public DNS, consider very low risk):
    This will allow your NAS storage to resolve IP address of “”.

    In case you don’t want to use those DNS servers. Do the ping of “” and use the IP address in wget command (not sure if uses static or dynamic IP, so this is safest then typing the address).

  9. Do you have or know where I can find a build of mediatomb that has been compiled to run java scripts on a DNS-325?

    I want to customize how my media is displayed. I’m OK with Linux but its not my strongest area. It looks like it would require configing and install libjs then recompile mediatomb with js support; finally installing the packages. This is a bit out of my league and any help would be greatly appreciated.

    Thank you,

  10. Hi!
    I installed fun plug on my dns 320!
    I would like to know if it was possible to install teamspeak or mumble the nas?
    You can compile this software if possible?
    thank you for your work and your tutorials!
    sorry for the translation, it’s google!

    1. Hi,

      i’ve tried teamspeak a couple years ago and back then it didn’t work. I haven’t tried Mumble but i guess the result will be the same.


  11. I installed ffp on my DNS-320
    Try as I may but I cannot get nfs to work. I get access denied no matter what settings I set in exports. My home-cooked NAS running ubuntu works great.
    This is the setting suggested.

    I also tried the ubuntu style
    /mnt/HD/HD_a2/music (rw,sync,all_squash)

    Any ideas??
    And yes nfsd is running 😉

      1. I did try your tutorial (which is awesome!) but mongo requires scons and then scons requires the python dev package and from there it just got too advance for me 🙂

        Thanks for all the fun_plug articles, they are very helpful

  12. Thanks Uli,
    It works just fine on my DNS-320. Now can i remote my downloads at home when i’m working.

  13. Hi,

    Thank you for your great tutorials !
    I try to understand your tutorial but I can’t understand the difference between the 3 way to update packages:
    – /ffp/pkg/
    – rsync to
    – rsync to

    The first is for basic packages and the 2 others for additional ones ?

    PS: Sorry for my english I am french… :p

  14. anyone have a pppoe plugin?
    i need it because my ISP use a xdsl ethernet modem that work only with dialup with PPPoE protocol.
    without using pppoe on NAS i can’t use the torrent download software or any internet realted plugin.
    The real question is why I can’t buy a cheaper broadband router? the answer is because I don’t want another stupid device..

    1. Hello Albert,

      You can always get a DSL/Router combo like those that Netgear offers (google search: Netgear DSL Router: I have used them with a lot of my customers and they work really well. Do some research on the right one for your type of DSL and you will end up with a faster DLS modem and you will never have to worry about logging in again.

      Good luck…

  15. im trying to get sickbeard and sabnzbd to auto start on my 320, everything i try doesnt seem to work, these are the commands i have to manually input to get them to run:

    python2.6 /mnt/HD/HD_a2/ffp/opt/optware/my-sickbeard-install/ -d

    python2.6 /mnt/HD/HD_a2/ffp/opt/optware/SABnzbd-0.6.14/ -f /opt/etc/SABnzbd.ini -d

    can someone help me get this to auto run on booting of the NAS drive??

    1. ok ive created a symlink, which find it finds on boot, but im getting this error:

      File “/opt/etc/init.d/S70SABnzbd”, line 1
      python2.6 /opt/SABnzbd-0.6.14/ -f /opt/etc/SABnzbd.ini -d
      SyntaxError: invalid syntax

      what can i do?

      1. if i manually type this into putty (ssh) it works:

        python2.6 /opt/SABnzbd-0.6.14/SAB -f /opt/etc/SABnzbd.ini -d

        but if i put it in the symlink it will not run, the ffp.log says this:

        * /opt/etc/init.d/S70SABnzbd …
        File “/opt/etc/init.d/S70SABnzbd”, line 2
        python2.6 /opt/SABnzbd-0.6.14/ -f /opt/etc/SABnzbd.ini -d
        SyntaxError: invalid syntax

        1. this is the contents of the S70SABnzbd file:

          python2.6 /opt/SABnzbd-0.6.14/ -f /opt/etc/SABnzbd.ini -d

          1. ive changed the script to something i found on the dlxtv wiki:


            with that script it starts! but then shuts itself down straight away. The sabnzb.log comes up with this just as it has started:

            [__init__:159] Signal 15 caught, saving and exiting…

            sabnzbd then shuts itself down cleanly.

            in my ffp.log it now comes up with:

            * /opt/etc/init.d/S70SABnzbd …
            Starting SABnzbd.


            Copyright (C) 2008-2011, The SABnzbd-Team
            SABnzbd comes with ABSOLUTELY NO WARRANTY.
            This is free software, and you are welcome to redistribute it
            under certain conditions. It is licensed under the
            GNU GENERAL PUBLIC LICENSE Version 2 or (at your option) any later version.

            * /opt/etc/init.d/ inactive
            * /opt/etc/init.d/ inactive

            feel like pulling my hair out lol!

  16. Me not work package install (Medion P89626), but the other step was okay:
    funpkg -i curl-7.18.1.tgz
    funpkg -i Transmission-2.42-1.tgz

    Pls help, thx.

    root@NAS-SERVER:/e-data/309d9bf3-4db4-46dd-af27-f4c69cfb5f13/ffproot/ffp/pkg# funpkg -i curl-7.18.1.tgz
    Skipping curl-7.18.1.tgz: Invalid package filename
    root@NAS-SERVER:/e-data/309d9bf3-4db4-46dd-af27-f4c69cfb5f13/ffproot/ffp/pkg# dir
    Transmission-2.42-1.tgz curl-7.18.1.tgz packages

    1. I also have the same (similar) issue, but in my case I’m running on a DNS-343. Some packages work, others not. Here’s a snippet after running funpkg -i packages/*.tgz (per instructions in this post)

      — start snippet —
      Skipping packages/joe-3.5-1.tgz: Invalid package filename
      Scanning packages/kernel-headers- …
      Installing kernel-headers-
      Skipping packages/less-418-3.tgz: Invalid package filename
      — end snippet —

      I’m wondering if I need to find the packages for the DNS-343? I’ve looked, but haven’t found it…


      1. I have the same issue i can’t install anything in fonz fun_plug 0.7. Any Idea?

          1. I am having the same issues

            : Invalid package filename

            DNS-320 with v2.02 firmware.

            any ideas?


    2. same error here also in update…

      root@NAS:/ffp/pkg# funpkg -u packages/funpkg*.tgz
      Skipping packages/funpkg-0.5-4.tgz: Invalid package filename

      any idea???

  17. Hi all.

    I have installed funplug 0.7, and followed up with the above tutorial.

    This unfortunately (either by hand or by downloads packages from, whic I resolved to However these packages are in .txz files, which I cannot decompress – the included tar doesn’t know what to do. I guess a newer busybox may help, but this is also in txz format.

    Can anybody help please?

    1. I’m looking into the same issue. I’ll let you know if I find out how to build my own packages.


    2. Hi Guys, did anyone figure this issue out with regards to invalid package filename?

      1. Yes!
        As installed funpkg doesnt seem able to manage txz compression – so I rebuilt the funpkg using
        tar -xf funpkg-0.6.3-arm-1.txz -J
        in an empty directory, then retarred it:
        tar -cf funpkg-0.6.3-arm-1.tgz -z *
        and upgraded to this.
        This version now seems to accept .txz files.

        The file name must end in tgz or txz, and must contain 3 hyphens.

        Hope this helps

        1. This will repack the package from 0.5 to 0.7. Sometimes the package will work and other times not, better check for the 0.7 repositories.

          Best Regards,

    3. When updating packages skips almost all because of invalid package filename..

    4. Hello,
      Can you resolve the issues of missing filename and txz?

      I installed the 0.7 package but does not work.

      Would be great if you could 🙂
      Thanks for all the work done anyway!


  18. Does anyone know when transmission stops downloading (pause downloads), will the dns-320 still go into hibernation?

  19. Hi,
    I’d have a very big problème. I’can swtich on the lighttpd server with fonz packages 0.7..
    i try the same methode like 0.5 ver. packages but it’s wrong…
    could you help me please.

  20. Comments are closed as 0.5 is deprecated and no longer supported. The newest versions of this tutorial are linked here.

    Best Regards,

  21. Pingback: Dodatek FFP Stick dla serwerów NAS ZyXEL |

Comments are closed.