The Firmwares of various NAS-Devices includes a very interesting bonus: the user can execute a script (file) named “fun_plug” when the OS is booted. Unlike all the other Linux software which is loaded when the NAS boots, this file is located on Volume_1 of the hard disk rather than within the flash memory. This means the user can easily and safely modify the file because the contents of the flash memory is not changed. If you delete the fun_plug file (see here for instructions), or replace your hard disk, the modification is gone.
Fun_plug allows the user to start additional programs and tools on the NAS. A Berlin-based developer named “Fonz” created a package called “ffp” (Fonz fun_plug), which includes the script and some extra software which can be invoked by fun_plug.
Installation of fun_plug is easy and takes only a few steps. These steps should be performed carefully, as they depend on typed commands and running with “root” privileges.
Contents
Purpose, risks, and benefits
Fun_plug is essentially a technique to stepwise turn a NAS with fixed out-of-the-box functionality into an open Linux machine on which you can install additional software packages and, if you want, learn a bit about Linux.
Responsibility
This also implies that you are (temporarily or permanently) turning a stable turnkey system into a system that the respective vendors no longer supports. This is similar to buying a notebook with Microsoft software, and installing Linux on it. The shop where you bought it can no longer help you if you claim the audio no longer works. Although there is a Tutorial on how to disable and even remove fun_plug, and although the authors have tested their recipes, checked the wording and added warnings, these are advanced tools which can, if you experiment more than your own know-how can handle, give advanced problems.
Risks involved in all this are not so much damaging your hardware (shouldn’t be possible), but loss of reliability of the NAS (you bought a file server to reliably store files, didn’t you). This risk may be acceptable because the software was preintegrated and tested by competent people. But you yourself are, at the end of the day, responsible for deciding to use this.
Possibly a less obvious, but more real risk is that some kind of extensions to the NAS (e.g. adding a server) imply that you may decide to open your local network a bit to the outside world. For example, to allow others to view your holiday videos stored on the device. The out-of-the-box NAS can already have this problem (via the ftp server). The point here is that you are responsible for the security of your device and entire network. This site doesn’t even have tutorials on basic security issues like firewalls, etc. because these are all NAS independent and the tutorials would never be foolproof anyway. So when used wrongly, the NAS and firewall obviously do allow others to read more data than you intended. Or to delete your valuable data. Or to replace software by other software (chance is small, but the impact is high).
Conclusion: as the NAS is a powerful networked device, and as these tutorials can help you make it even more powerful, you are responsibility for having the basic understanding of networked security. Again, this also applies to an out-of-the-box NAS. But the more you mess with it, the more you need to apply some common sense. This is incidentally the reason why we provide some explanation on what you are doing in the tutorials, rather than just telling you what to type
Benefits
The main reason why people go this route is to extend their NAS with servers such as BitTorrent clients or Web servers. Other typical uses are to add extensions which fix current limitations of the device (e.g. time accuracy, fan noise).
Technical synopsis
In a first step, we install a script named fun_plug that provides a hook to extend the boot process of Linux on the NAS. That hook was intentionally added by the vendor to enable this. But the vendors do not document or support all of this.
An initial set of packages (downloaded as a single compressed archive) gives you enough tools to get started and, if you are curious about the machine or its software, to carefully look around.
This set of tools gives you the ability to install even more software packages (typically servers) from trusted sources. These packages should obviously all have been compiled for the processor in the NAS and should have been tested on the device (or a very similar device) by a software expert.
Steps for installing fun_plug
Preparation
The NAS needs to have a valid network configuration. Check the gateway & dns-servers to be valid. If the NAS receives the network configuration via DHCP it should be correct in most cases. If you receive the error “wget:bad address `wolf-u.li`” (or similar / other domains) the configuration needs to be checked.
Please ensure that the internal “Remote Backup” Services is deactivated. This server is shipped with newer NAS like the DNS-320/DNS-320L/DNS-325/DNS-345 and conflicts with the SSH-Server of the fun_plug. If you want to use the Backup-Service, please take a look at this tutorial after you have executed the installation of the fun_plug.
Determination of the correct fun_plug
Fonz has decided to build to version of the fun_plug for different devices. The Types are “EABI” and “OABI” which you can determine by clicking on the description of your device here. Then search for “Application binary interface” in the details.
Download
Download the latest files:
- fun_plug
- fun_plug.tgz
- Version “ARM” for EABI-devices (like the DNS-320/325/345 and CH3MNAS)
- Version “OARM” for OABI-devices (like the DNS-323 and CH3SNAS)
Ensure that these two files are named fun_plug (not fun_plug.sh) and fun_plug.tgz (not fun_plug.gz or fun_plug.tar.gz or fun_plug.tar).
Place both files in the topmost directory of Volume_1 of your NAS. If you use Windows Explorer it could look like this or this or similar. If you are running a different OS like Linux or MAC OSx, please ensure that the file fun_plug is marked as executable (chmod 777).
Option: view the fun_plug script
For fun, you may want to open the file fun_plug. If your are on Windows choose Notepad++ or any other “better” Editor. Avoid using Windows’ Notepad for viewing/editing Linux text files: Windows and Linux use different end-of-line conventions. Please be careful not to accidentally modify it.
The script fun_plug is an ASCII file with commands which are executed by the Linux command interpreter (sh for “shell”).
Lines starting with “#” are comments (“#!/bin/sh” is a special case).
You might be able to decode that the program creates a log file called ffp.log (an ASCII file used here to capture the lines which start with “echo”).
Firstly, a number of named constants are defined for various file names and fragments of file names (the lines like “FFP_SOMETHING=...“).
You can see that Fonz developed it for a D-Link DNS-323 (rather than a Conceptronic CH3SNAS, but this doesn’t matter as Uli, PeterH and others have tested in on the CH3SNAS).
The command date will copy the current date and time to the log file.
Next, a first script setup.sh is run if it is found in the expected /mnt/HD_a2/.bootstrap/ folder. Initially it will not be found.
Then a new directory “ffp” is created (mkdir) and the fun_plug.tgz file is unpacked (tar) into that directory. This step is a bit more complex than normal due to a problem with the tar version supplied with the NAS. As a workaround tar is run twice (first the older version, and then the tar version which was untarred from fun_plug.tgz).
If all went well, the log file gets an extra “OK” string. And the tarball input file is deleted (rm). This obviously only happens once (the script skips the unpacking if the tarball file is not found using the if [condition]; commands fi construct).
The “chown” is about changing ownership for a program called busybox. And “chmod” is about changing access privileges.
Then, a script file /ffp/etc/fun_plug.init (“containing the ffp-scripts package”) is executed if it is detected.
Next, a script file /ffp/etc/fun_plug.local is executed if it is detected. It can be used to add your own startup commands: it will not be overwritten by package updates.
Finally, a script file /ffp/etc/rc is run if it exists.
Reboot
Reboot the NAS by holding down the power button 5 seconds or via the web interface (Mostly ”Tools” -> ”System” -> ”Reboot” or similar somewhere in the menu of the webinterface). This causes the NAS to go and find the file fun_plug on Volume_1 and execute it.
Option: view ffp.log
If you are interested, you will find that the fun_plug.tgz tarball has disapeared, and has been unpacked into the newly created ffp directory.
You will also find the ffp.log file created during execution of the fun_plug script and while executing some of its commands. It is longish (e.g. 47 KBytes) because the tar program generates a lot of warnings about repairing links (this only happens once). You can view the log file with WordPad or NotePad++.
From now on, whenever the NAS is rebooted and thus the fun_plug script is re-executed, the script appends about 15 extra text lines to the end of this log file. These contain the date/time of reboot and the status of various servers which you may enable in the future (see below). This appending of information to ffp.log gives you one way to determine whether fun_plug is really running: if you last reboot of the NAS is listed, fun_plug and any servers that it actives are running.
Note that the end of the initial log file already states that a server called telnetd is already running. We will use Telnet in the next step.
Connect via telnet
After rebooting, you need to connect to the NAS using a protocol called Telnet. Telnet allows you to “login” on a remote machine via a command line window.Windows users can use an open-source telnet client called PuTTY. PuTTY is a self-contained program: the PuTTY.exe file can be stored wherever convenient and executed without any prior installation. In the PuTTY configuration screen you need to set the following before pressing Open:
- Host name (or IP address): use the name of the share (e.g.
CH3SNAS) or its IP address - Select Connection type “Telnet” (which defaults to port 23)
Now you can press Open (PuTTY can save these settings under a default or name if you want, but you will likely be using ssh instead of telnet later on). In PuTTY these setting could look like this:

Linux users are “supposed to be” familiar with how to use telnet.
After connecting to the device, the first line telnet will show:
/ #
Or
sh-4.1#If this doesn’t show up, type “5784468″ to get this prompt.
![]()
If you can see the prompt, you are logged in. This command “prompt” is where you can type in commands. The prompt shows you are in the root directory. Note that Linux command lines are not very communicative. These Rambo-like social skills are generally attributed to Linux’ resource-deprived childhood.
Change root password
We proceed with updating /etc/shadow by using the program pwconv. It uses /etc/passwd to generate the necessary lines in the shadow-file. Also the default shell will be changed. Additionally the home-directory of root is changed to a permanent one:
usermod -s /ffp/bin/sh root mkdir -p /ffp/home/root/ sed -ie 's#:/home/root:#:/ffp/home/root:#g' /etc/passwd pwconv
Hints:
- If the following error comes up when using “usermod”:
"usermod: no changes", just ignore it. In this case the shell is already set to the correct one. - If the following error comes up when using “pwconv”:
"pwconv: failed to change the mode of /etc/passwd- to 0600"just ignore it and proceed.
Now we need to change the password of user “root” to prevent unauthorized access.
Run the passwd command and enter a new password twice (note that Linux passwords are case-sensitive):
passwdNow check if everything went right using:
loginIf this was successful, proceed to the next step, otherwise return to “passwd“.
Store the password in the NAS. This step is essential, otherwise your password will be cleared on the next reboot! Also when you change the password of any user using the commandline, run the following store-passwd.sh again!
wget http://wolf-u.li/u/172/ -O /ffp/sbin/store-passwd.sh store-passwd.sh
Activate SSH
Now activate SSH (secure shell: telnet has major security limitations). Such lines can best be copied line-by-line or together into PuTTY:
chmod a+x /ffp/start/sshd.sh sh /ffp/start/sshd.sh start
sshd.sh takes a while to execute and generates three pairs encryption keys for secure communication between the CH3SNAS and a remote client (computer). Each pair has a “fingerprint” for the public key and a corresponding graphical “randomart” image. The fingerprint for the RSA encryption algorithm will incidentally show up again in the next step.
As shown in one of the pictures, the first time you connect to this new (as far as ssh is concerned) machine, you will get a stern warning from ssh. This is because ssh expects to be connecting to this machine through an encrypted connection (now and likely in the future). But ssh wants to be sure that you are connecting to the intended machine rather than to an imposter (“man-in-the-middle”) and has no way of knowing if this is the case. Assuming that you are connecting to via your own (safe) LAN, you don’t need to worry whether the presented identification (public-key fingerprint) is the right one. If you need to connect over the internet (very unlikely) or are paranoid (unlikely), you can follow the confirmation procedure described in this website.
Note that this step associates the name and IP number of your NAS with this public key (this is stored on your computer). This means that during future ssh sessions to this machine the confirmation of the public key is done automatically.
Logging in using SSH
Now you can try to login using an ssh session as user root. This involves starting a second copy of PuttY.
Once you were logged in sucessfully, you can deactivate telnet using:
chmod -x /ffp/start/telnetd.sh
Note that at this point telnet is actually still running, but it will stop working the next time you reboot the NAS (DO NOT REBOOT YET!). Once you have tested that the ssh server and the associated root password, and encryption keys are working fine you can turn telnet off.
sh /ffp/start/telnetd.sh stop
Now what?
Congratulations! With the last step, you’ve installed your fun_plug
Now you need to execute a few steps to be able to install more packages.
First the sources for packages are installed:
wget http://wolf-u.li/u/441 -O /ffp/bin/uwsiteloader.sh chmod a+x /ffp/bin/uwsiteloader.sh uwsiteloader.sh
After entering the last line a menu pops up:

Press “Enter”

Press “Enter”. Now a screen pops up where you can choose the sites.
![]()
To choose an entry, you need to mark it with the arrow-keys on your keyboard and then press spacebar to activate it. It is activated if there is [*] in the first characters of this line. Please choose at least “fonz” and “Uli”, otherwise the tutorials on this website will not work. At the end choose “OK” and press “Enter”.

Press “Enter”

Press “Enter”. This executed the update of the sites to see the current packages. This will not execute a installation. Now you need to install one more package before executing your next reboot:
slacker -UaA uli:uwchmodTo see what this package is about, you can go here.
You can now follow additional tutorials or (carefully) look around using the command line!
Notes
Fun_plug and user accounts
Note that the initial execution of the fun_plug script creates a new user group utmp.
The script that installs the ssh server creates a new user named sshd and adds the user to utmp. This user is for internal use only, and has no ability to login. It is standard procedure when installing OpenSSH, and believed to be safe.
On a NAS, user sshd also shows up as having read-only ftp access to Volume_1. Although it is doubtful that this user really can access ftp, this seems to be a bug and is being investigated.er group utmp.
The script that installs the ssh server creates a new user named sshd and adds the user to utmp. This user is for internal use only, and has no ability to login. It is standard procedure when installing OpenSSH, and believed to be safe.
On a NAS, user sshd also shows up as having read-only ftp access to Volume_1. Although it is doubtful that this user really can access ftp, this seems to be a bug and is being investigated.






i have dns-325, with 2 hdd, simple format, volume 1 and volume 2
when i placed fun_plug and fun_plug.tgz in volume 1 (as per instructions) nothing happened! placed them in volume 2 and it worked. would that affect your commands to install twonky 7?
No it does not affect the commands.
Best Regards,
Uli
thank you
If possible, can you please brief me why it worked on volume_2 instead of volume_1 contrary to what is explained in the tutorial
Regards,
Firas
The firmware mixes the Shares in Samba sometimes. No idea why
Best Regards,
Uli
Hi Uli,
Thanks for your guides, it’s been really a great help fore newbies like me
I have followed the instruction for fun_plug installation on a DNS-320L step by step, except for this:
Note: For the D-Link DNS-320/DNS-325/DNS-345, you need a different store-passwd.sh script. See this entry for further details
and now I seem to be having issues to ssh to my device with this message in telnet:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0777 for ‘/ffp/etc/ssh/ssh_host_ecdsa_key’ are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: /ffp/etc/ssh/ssh_host_ecdsa_key
Could not load host key: /ffp/etc/ssh/ssh_host_ecdsa_key
Disabling protocol version 2. Could not load host key
I have managed to regenerate the key pair but now it says and it says :
Your identification has been saved in /ffp/etc/ssh/ssh_host_ecdsa_key.
Your public key has been saved in /ffp/etc/ssh/ssh_host_ecdsa_key.pub.
Starting /ffp/sbin/sshd
/ffp/var/lib/sshd must be owned by root and not group or world-writable.
also when i check the sshd.sh status it is not runnig and I can not get it to in order to make an ssh connection via Putty.
Can you please help me? Putty keeps saying Network Error:Connection refused and is driving me crazy.
Thanks,
Petar
Hallo!
Installiert habe ich es ohne Probleme, allerdings finde ich in meinem Ordner keine mediatomb.sh und habe dementsprechend auch kein mediatomb (und deswegen hatte ich erst einmal installiert).
Da ich echt nicht so firm bin: Finde ich irgendwo eine Anleitung, wie ich mediatomb unter fun_plug 0.7 installiere?
Danke und Grüße,
H
Hi there, I have installed fun_plug on my DLINK DNS-320, it works perfectly the first time i use it, then, when i restart it, it dont work anymore, i followed the exact instructions and it dont work any long, thanks uli.
Hi, what does not work? SSH? Or ffp? Check ffp.log on the HDD to see if it starts.
Best Regards,
Uli
I cant use telnet anymore with it:
Trying 192.168.1.102…
telnet: connect to address 192.168.1.102: Connection refused
telnet: Unable to connect to remote host
Use SSH. You’ve disabled telnet with the last commands in the tutorial.
Best Regards,
Uli
sorry for asking questions all the time!!, this is the message i get now…
ssh 192.168.1.102
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
78:e3:84:10:e1:58:01:fa:d5:53:e0:e7:a3:0a:3a:63.
Please contact your system administrator.
Add correct host key in /Users/NICOLAS_macbookpro13/.ssh/known_hosts to get rid of this message.
Offending key in /Users/NICOLAS_macbookpro13/.ssh/known_hosts:1
RSA host key for 192.168.1.102 has changed and you have requested strict checking.
Host key verification failed.
Remove the offending key from “/Users/NICOLAS_macbookpro13/.ssh/known_hosts”, then it will work. Background is, that you have probably reinstalled the ffp and that there was ssh activated before. Now the ssh-server has a different fingerprint which does seem as if the connection between you and the macbook was corrupted or interrupted. But as you know that this is not the case, simply remove the “old” key.
Best Regards,
Uli
Hello Uli,
Does the latest version of fun_plug come with the same pre-installed packages in version 0.5?
I’m very interested in mediatomb
Regards,
Firas
Hello Firas,
there are a number of packages available, nearly the same as with 0.5 if you have a newer device. With older devices like the dns-323 i really don’t know as i havent compiled any packages for this environment (will do, but haven’t tried yet).
Hope this helps.
Best Regards,
Uli
Seams that it boots from drive mapped to HD_a. Maybe there’s some other mechanism that tries to boot from Volume_1 instead of HD_a’s partition… but it at least sometimes fails. If it boots fun_plug from volume_2… switch bays.
Hi,
I own a DNS-325 with fun_plug 0.5 plus Twonky 6 installed.
How can I update to fun_plug 0.7 ?
Regards,
Mauro
Remove everything and installed it from scratch. Unfortunately there is no way to upgrade to ffp 0.7 and twonky 7
Best Regards,
Uli
For some reason the download of fun_plug.tgz gets renamed to fun_plug.gz
I’m not sure why this is happening, but it tripped me up for a while when trying to install 0.7. I thought that 0.5 wasn’t cleanly uninstalled for a while.
The error message that is logged in ffp.log is: /ffp/etc/rc: Not found or not executable
Thanks Sean, was pulling my hair out unable to figure out what the “Not found or not executable” , renaming it .gz >> .tgz did the trick
Hi,
first of all thanks for your great work !
I just wonder if the folowing “tar problem” also applies to DNS-320 and DNS-325 :
” [...] due to a problem with the tar version supplied with the NAS [...] tar is run twice (first the older version, and then the tar version which was untarred from fun_plug.tgz)”
wget http://wolf-u.li/u/172/ -O /ffp/sbin/store-passwd.sh
geht bei mir nicht, bekomme einen timeout. allerdings kann ich ohne probleme etwas anpingen.
hatte das ssh packet erneut runtergeladen und dann einfach weitergemacht, allerdings war die passwd trotzdem leer. ich kann es manuell runterladen, bekomme es aber wegen fehlender schreibrechte nicht reinkopiert.
any hints?
sorry wrong language…
wget http://wolf-u.li/u/172/ -O /ffp/sbin/store-passwd.sh
did not work, i get an timeout. but i can ping everthing in the www.
i download the ssh package with the package manager and start over. after restart cant log in (passwd empty). if i download the passwd.sh manualy i can copy it into the correct folder because of the rights…
everything works (had to disable firewall in router…)
twonky runs also, nice!
Just ran install on a DNS-321 and it worked like a charm (discounting Chrome adding the “.txt” extension to the fun_plug script and my paranoia causing me to reboot the NAS after enabling SSH to verify its startup functionality before disabling Telnet).
Except for one little problem: I did not pay sufficient attention to the directory structure at your end and so I installed OARM rather than ARM and only belatedly saw the note “oarm is obsolete. Please use the oabi variant instead”.
Gee…wish that directory wasn’t even there.
So now I can report that the fun_plug removal script at http://nas-tweaks.net/59/removing-the-fonz-fun_plug/ works like a charm, too – and that the installation procedure for the ARM version of fun_plug on a DNS-321 also works like a charm. 8^)
Hello. What’s the difference between version 0.5 and 0.7. I have the DNS 320, which version should I install?
0.7 is newer obviously. Install 0.7, support for 0.5 has been dropped.
Best Regards,
Uli
Hi Uli
Hopefully you can help? I installed funplug and everything seemed alright. Today I attempted to log back into my NAS using putty to try and create a symlink for my Volume_1 but I cant remember the password I created. Can I reset the password and start again?
Yes you can, download this file, place it next to
fun_plug. Then reboot. This will only reenable telnet, so you can set the password and disable telnet again.Best Regards,
Uli
Hi guys.
Just tried the installation (putting the two files on the root of Volume_1 of my DNS 343) and after restarting, nothing happened.
The files are there and the .TGZ file wasn’t decompressed to the FFP folder.
Do I need to do something before? I just bought it, installed the two drives and formated as JBOD.
Thanks in advance.
I just did the same thing and found the same as you. I made the fun_plug.sh executable for all and the same thing happened – nothing!
there is no
fun_plug.sh, onlyfun_plug. Please remove the extension.Best Regards,
Uli
Exact same issue. fun_plug.tgz does not unpack on reboot because fun_plug not being executed. Both sitting in top directory. Win 7 will not let me save fun_plug without a file extension. Any thoughts. Many thanks
What is the error Windows 7 is giving you? you could rename it via the console?
Cheers,
Uli
Clicking on the link opens the standard save as browser box with the file name ‘fun_plug.*’. Clicking ‘save’ with this file name gives no response at all. The same occurs if I save without the *. If then Ireplace * with an extension (txt for instance) I can save into volume 1 but removing the file extension in explorer just gives ‘invalid file extension’ error. Thanks for your help
Did you download the correct fun_plug.tgz? Did you mark fun_plug as executable?
Best Regards,
Uli
Hi;
Just tryng installation, and in the first step usermod -s reply user ‘root’ does not exist. In ffp.log seems to be all fine. Any advice? Can´t change any privileges.
Thanks and regards.
I read carefully another time and ffp.log isn´t ok,its only 1kb.
I have installed fun plug two or three times and each time I get this message in the log file:
/ffp/etc/rc: Not found or not executable
I am working on a DNS 320 with 2 x 2TB drives linked in a Raid 0 format, any ideas?
Yes, fun_plug.tgz is not available. Please check and ensure that this file is there.
Best Regards,
uli
I’ve DNS 325 and version 0.5 installed, there’s any way to upgrade to version 0.7 without remove previous version?
Thanks and regards.
No there is not.
Best Regards,
Uli
I went through the steps and all seemed to go well until I diconnected the telnet session and restarted my DNS-320, I connected via telnet (SSH) which was ok, logged in as root and entered the password I set earlier but I kept getting Access Denied. I have reset through the web portal and through the power button but the problem persists, have I missed something?
How can I find which packages are available for 0.7? I am looking to modify a DNS-320 into a Network Video Recorder. This needs an application such as Motion which has depenadancies such as mySQL.
Thanks.
hi Erin…
did u get any solution for NVR. I had some cameras and I wanna record on my DNS-320 too..
feedback will be appreciated.
Txs. walteroa
Hello Erin,
check slacker for the available packages.
Best Regards,
Uli
Hi, My DNS-320 had been working perfectly until this morning when one of my CentOS clients couldn’t use the NAS hosted home directory. I inititially had this problem when I didn’t have the ffp nfsd.sh enabled but having started that all was well until today. Anyway, I tried rebooting the box and have now lost ssh access. What should I be looking at to find out what’s gone wrong?
Thanks
In the great tradition of answering ones own question….. I rebooted the NAS box again and ssh is re-enabled, I thought I tried a second reboot this morning but maybe not. I’d still like to know where I should go to look for problems if this happens again.
Thanks
Hi Thanks for this great work.. Now i realy like mine dns-320!
Only 1 problem, the password does not stay after reboot?
I run the storepass sh but after sec reboot still no password stored..
Any Idea?
Thanks!
Did you donwload the alternative store-passwd.sh as described in the Tutorial?
Best Regards,
Uli
Thx for your quick reply.
Do you meen : wget http://wolf-u.li/u/172/ -O /ffp/sbin/store-passwd.sh
store-passwd.sh
Then Yes. otherwise no..
Hi,
I have made a big mistake-
For some idiotic reason i made an error and did not start SSH. I did however restart the NAS!
I tried to uninstall ffp with provided instruction but cannot login with putty on SSH or telnet.
Can you help me regain access to my drive?
Hi Gus,
download this file and place it as fun_plug.tgz on Volume_1. This will reenable Telnet (not reinstall fun_plug, no worries), from where you can enable SSH.
Cheers,
Uli
Hi Uli,
Thx for repling so quickly. Now i cannot see the drive from windows or through the nas GUI?
So not sure how to place the file.
AAAAhh
Hi Gus,
a very stupid question, but how do you then access the nas if it’s not available via Windows nor from the GUI? Is it switched on
?
Place it like described above in Volume_1. Add this share in the GUI if you do not have it. If you can’t find the NAS in the network, download the D-Link Tool for finding the NAS. If this tool doesn’t find it, please reboot nas first and if that doesn’t help, reset to factory settings.
Best Regards,
Uli
Hi,
After rebooting the naz the vol 1 has reappeared!Have now dl fun_plug.tgz and added to vol 1. Just restarting now.
Cheers
Gus
Hi, ok.
I can now login as root with my password to ssh.
What code do i write to remove ffp completely. Also i do not have permissions to add to my vol 1 now through windows. Also when i acces vol 1 through windows I can see all the folders i have created but there are no files visible inside them?
Hi to all. No luck in install the package on the DNS320 (1 disk only). Tried many times and always get a txt file saying cannot found or execute but no FPP folder. I have other folders in the Volume_1, should I delete all first? Thanks in advance.
Does the name of your second file equal fun_plug.tgz or is it for example fun_plug.gz or fun_plug.tar.gz?
The error is that this second file cannot be found.
Cheers,
Uli
Hi Uli and thank you for chime in. The file as downloaded have no extensions (both) and I have added .tgz to the tar file only. tried again now and again the same result: just a log named fpp saying not executed or not found…
For some reasons, after another reboot now I have also a zipped folder named fun_plug.tgz. Tried to unzip and got a folder with another zipped folder inside…. unzipped also this one and got messages as “you want to replace this file with this (0 bytes)”, said no and when at 99% started to have errors….
What’s wrong? Thanks in advance.
Solved the win 7 file type problem – save as “fun_plug” (including the speech marks) and it will save with no file extension. Rebooting then gives the unpacked files.
Next problem – cannot access the DNS via telnet. Putty will give me an open command screen with the correct IP address in the taskbar but no command prompt.Typing 5784468 has no effect – the window times out in a few seconds.
Hi, i’ve tried to install on DNS-320 gnupg-2.0.18-1.tgz for file encryption (from wolf-u.li collection). finally it started, but it needs “pinentry” for secure PIN and passphrase entry. So i couldn’t find this package “pinentry” for DNS-320. What can anyone suggest in this case? Thanx.
I will compile it.
Best Regards,
Uli
done.
Hi, I can’t save password.
I follow the procedure, change passwd, run donwloaded store-passwd script, login, all is ok but when I restart my DNS320, the pwd root is gone.
Any idea?
Thx
Same problem as Klingon exactly. All commands run ok, however upon reboot I can login with no root password.
Anyone have any idea why?
Hello
Same problem again, trying to store the password:
sh-4.1# wget http://wolf-u.li/u/172/ -O /ffp/sbin/store-passwd.sh
--2012-08-31 10:06:35-- http://wolf-u.li/u/172/
Resolving wolf-u.li... failed: Name or service not known.
wget: unable to resolve host address `wolf-u.li'
So I’ve manually downloaded store-passwd.sh & placed it in /ffp/sbin/
Then run store-passwd.sh without an error, but there is no ‘Saving userdata’ message returned either.
I can then login with SSH but then reboot NAS & the password’s gone.
Can you help?
Thanks
Tony.
Missing MEDIATOMB. I’ve got a DNS-320. I follow this procedure to install fun_plug the for the first time few days ago. At that time I had only one HDD on the DNS. When I’ve installed the second HDD I decided to remove the old one and reinstall fun_plug on the new hdd. Everything worked fine but for one thing: MEDIATOMB has disappeared (I’ve used it the first time I installed fun_plug. I’ve repeated the procedure many times now, but mediatomb has never came back (none in ffp/bin nor ffp/start). I’m sure I’ve used the right package (the ones listed in this tutorial). How can I install MEDIATOMB manually?
I’ve a DNS-320L. I installed 0.7 package. Before restart I could login in through SSH, but aftar restart I can’t. This window appear “Network error: Connection refused”.
Hi Hangya
I’m having the same trouble…
Did you find a way the resolve it ?
Thanks
Successfully installed everything and worked like a charm. Now I need to uninstall EVERYTHING because I am selling NAS with HDD included. I believe I have removed fun_plug, but now I cannot access the NAS through Windows, before this I wasn’t able to take permission of any files because of Unix user (or something along those lines), please could someone help me, i’m getting seriously stressed here! Thank you.
Just format the disks via the webinterface, then everything is gone. Then reset to factory settings
Best Regards,
Uli
But but but, the thing is my friend would like all my videos on there too! Which could be a bit of a problem :/ any ideas? Cheers.
Reset to factory settings only. If you still have problems to access it via windows, then install fun_plug, chmod everything to 777 and remove fun_plug.
Best Regards,
Uli
“For fun, you may want to open the file fun_plug by left-clicking here. ”
****
The link points to the old 0.5 version
Thanks
Best Regards,
Uli
Does anyone have experience or have tried Zoneminder on DNS320?
I wanna record my cammeras using this tiny linux app that requires perl+mysql ..
but no idea how to start.. (http://www.zoneminder.com/)
ps: I’ve already installed fun_plug.
help we aappreciated.
Hi, did you find the mysql package for ffp 0.7 as I too have a dns-320 and really want to install mysql?
thanks.
During fun_plug installation i chose one simple password for root, can i change it by ssh? How?
Ty
log in via SSH, and type:
passwd
then input your password, and choose a new password
After rebooting password not was saved.
Now i have to store new password on nas, what is right procedure? Need another time file store-passwd.sh?
Ty
I see this as well. Passwords are not being stored via the store-password.sh script.
Thank you very much
)
Hi Uli,
First of all, thanks for all the great work on these NAS tweaks – they are fabulous.
I thought I’d let you know that you may have a bug in the /ffp/start/sshd.sh script.
I noticed that I was seeing the following in the ffp.log file:
* /ffp/start/sshd.sh ...Generating public/private ecdsa key pair.
/ffp/etc/ssh/ssh_host_ecdsa_key already exists.
Overwrite (y/n)? Starting /ffp/sbin/sshd
It appears this error may be to a invalid reference to the ssh file in /ffp/start/sshd.sh script. The original script reads:
if [ ! -f /etc/ssh/ssh_host_ecdsa_key ]; then/ffp/bin/ssh-keygen -t ecdsa -f /ffp/etc/ssh/ssh_host_ecdsa_key -N ''
fi
I believe it should read:
if [ ! -f /ffp/etc/ssh/ssh_host_ecdsa_key ]; then/ffp/bin/ssh-keygen -t ecdsa -f /ffp/etc/ssh/ssh_host_ecdsa_key -N ''
fi
Cheers,
Mark
Hi
I’m seeing the same bug..i’m not a linux user.. not sure how to correct this bug..any help .. i really appreciate it
Prabu
Thanks very much for the excellent tutorial – I followed it, and all is in order. I also set up user accounts for my wife (lesley) and me (ian), and I can ssh from a terminal window on my linux box for all three accounts (root, ian and lesley). When I log in as root or ian, I get the prompt I would expect (root@ford:~# or ian@ford:~$), but when I log in as lesley I get the prompt lesley@ford:/mnt/HD/HD_a2/ffp/home/lesley$, i.e. the absolute pathname to lesley’s home directory. This seems curious – do you know why it happens, please?
Thanks
Ian
Weird result after installing FP 0.7 on DLink NAS-325:
When booting up a Mac Mini on the network, and automounting the NAS Volume_1, I get a pop-up which reads “The disk you inserted was not readable by this computer.”
I have to choose between an Ignore button and an Eject button to close the popup.
BUT the Volume is mounted successfully.
Can send a screen shot if that helps.
G. Kinal
Hi,
I just got myself a DNS-320L. Can I also install fun_plug there? Telnet doesn’t seem to work.
Alex Wien
Hi,
I installed ffp following the tutorial.
All seems ti work fine but ….
FFP in installed on my DNS-320 on /Volume_1/ffp and all my medias are on /volume_1/MEDIAS/
Can MiniDLNA see my medias ?
Fred
I’m having trouble with ‘wget’ and ‘rsync’ because my NAS isn’t reaching outside the network.
For example:
wget http://wolf-u.li/u/233 -O /ffp/start/optware.sh--2012-10-07 09:25:33-- http://wolf-u.li/u/233
Resolving wolf-u.li... failed: Name or service not known.
wget: unable to resolve host address `wolf-u.li'
–> same is true for ‘rysnc’
Can anyone provide some information on what the NAS network settings need to be so that the NAS can ping outside the network. I’ve tried disabling the firewall but that didn’t change anything?
My NAS (Static IP) is wired directly to my router (Buffalo with DD-WRT) which is running DHCP. All other devices on the network can access the internet.
From mac:
ping http://www.google.com
PING http://www.google.com (74.125.141.106): 56 data bytes
64 bytes from 74.125.141.106: icmp_seq=0 ttl=47 time=28.333 ms
64 bytes from 74.125.141.106: icmp_seq=1 ttl=47 time=19.278 ms
From NAS:
ping http://www.google.comping: bad address 'www.google.com'
Check the settings of your NAS regading the DNS-Servers. Probably they are empty. Maybe 8.8.8.8 will help
Cheers,
Uli
I don’t know why that worked but it did.
Just they way networking topography works
The unit needs a DNS (domain name server) to RESOLVE domain names to their actual IP addresses; Without it, you basically have no way of knowing that Google.com actually points to 173.194.33.5
I always set my DNS server to 8.8.8.8, because other DNS servers can fail, but google is almost always reachable
I’ve problems with reading speed with my dns-320 nas. I can write (gb lan) to it at 22Mb/s but i can read from it only at 8Mb. I’ve noticed that disabling fun_plug 0.7 make the speed as i’ve seen in origin. 23Mb at least both read and write. Anyone know why? I need fun_plug to use twonky media server on it…any solution? Thanks. Best Regards.
Can someone compile esmtp for ffp .7 oabi please…?
Tks!
Hi All,
Are there any known issues with having a root passed service a DNS-325 reboot? I downloaded the store-passwd.sh script from ULI’s site and the password is lost every time I reboot.
And it looks like a few people of this list are having the same problem with no resolution. The script appears to run successfully, so I don’t know what is going on here.
Thanks.
Hi,
I just got myself a DNS-320L. Can I also install fun_plug there?
Itso
Yes, you can. Did it a month ago and everything went perfectly following Uli’s instructions for dns-320.
Br,
Petar
Hello i can’t manage to communicate via telnet with my 320L (I use putty on W7)
Did you used specials configuration ?
Hi Uli,
Thanks for your guides, it’s been really a great help fore newbies like me
I have followed the instruction for fun_plug installation on a DNS-320L step by step, except for this:
Note: For the D-Link DNS-320/DNS-325/DNS-345, you need a different store-passwd.sh script. See this entry for further details
and now I seem to be having issues to ssh to my device with this message in telnet:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0777 for ‘/ffp/etc/ssh/ssh_host_ecdsa_key’ are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: /ffp/etc/ssh/ssh_host_ecdsa_key
Could not load host key: /ffp/etc/ssh/ssh_host_ecdsa_key
Disabling protocol version 2. Could not load host key
I have managed to regenerate the key pair but now it says and it says :
Your identification has been saved in /ffp/etc/ssh/ssh_host_ecdsa_key.
Your public key has been saved in /ffp/etc/ssh/ssh_host_ecdsa_key.pub.
Starting /ffp/sbin/sshd
/ffp/var/lib/sshd must be owned by root and not group or world-writable.
also when i check the sshd.sh status it is not runnig and I can not get it to in order to make an ssh connection via Putty.
Can you please help me? Putty keeps saying Network Error:Connection refused and is driving me crazy.
Thanks,
Petar
P.S. Sorry for the double entry of this post, I have incorrectly replied to a previous post .
Hi petar i solved this !!!
I add in ffp/start/sshd.sh file
the lines :
chmod 700 /ffp/var/lib/sshd/
chmod 700 /ffp/etc/ssh/ssh_*
just before the line “proc_start $command”
hope this will help you and users of 320L
Thank you Ced!
))
works perfectly now, pfu at last
Cheers,
Petar
I try with this but it doesn’t happend.
/ffp/etc/ssh/ssh_host_ecdsa_key -N ”
fi
chmod 700 /ffp/var/lib/sshd/
chmod 700 /ffp/etc/ssh/ssh_*
proc_start $command
Is this right?
It’s actually what i have :/
And when you start the sshd.sh you still have the same error log as petar above ?
Yes exactly the same error.
Could you send me your sshd.sh fail to try whit him.
h.yankov@mail.bg
Thanks
/ # cp /etc/lighttpd/lighttpd.conf /ffp/lighttpd_portmod.conf
/ # server.port = 200
/ffp/bin/sh: server.port: not found
/ # cp /etc/lighttpd/lighttpd.conf /ffp/lighttpd_portmod.conf
/ # server.port = 200
/ffp/bin/sh: server.port: not found
what happened to this command? please help. thanks!
First of all I’d like to thank you, Uli, for sharing your remarkable work.
As there could be other people interested, I want to mention that I have successfuly installed ffp 0.7 on a DNS-315 NAS. I used the ARM version of fun_plug.tgz and had to make some minor adjustments:
* the HDD mount point is /mnt/HD/HD_a2
* there seems to be a problem with file permissions – after reboot most of them are reset to 777 and that upsets sshd and also prevents choosing the startup scripts. So I set 600 permisions for /ffp/etc/ssh/ssh_host_* and 755 for /ffp/var/lib/sshd in fun_plug.init. I used the same init file to set execute permissions for scripts in /ffp/start
* I also changed a line in sshd.sh to correctly check for the /ffp/etc/ssh/ssh_host_ecdsa_key file.
EugenR, fun_plug works in my DNS-315, too. But for some reasons SSH keys permissions return to be 777 again after reboot.
During initial boot they are correct, and ssh daemon starts correctly. Afterwards SSH does not work because of these wrong permissions.
Please help me, thanks!
Hi EugenR,
Can you explain how do you do to set permissions for ssh folders in fun_plug.init ?
Thanks
Hello
Sorry for my late reply. I added to /ffp/etc/fun_plug.init the following line, just before the section dedicated to enable/disable services:
chmod 600 /ffp/etc/ssh/ssh_host_*
Hope that helps,
Eugen
I purchased a DNS 315 recently. Would love to get fun_plug working. Copied fun_plug and fun_plug.tgz (ARM version) in Volume_1 . Permissions are 0777. Rebooted. Nothing happens.
Added the following lines to fun_plug after the line cd /
touch ./Volume_1/test.log
mkdir ./Volume_1/hello
mkdir testing
It appears as though fun_plug isn’t getting executed.
Any suggestions on what to try next?
DNS-323
Downloaded fun_plug og fun_plug.tgz
Placed both files in the topmost dir of Volume_1. Then I rebooted the NAS. Now I cannot access vol 1. The D-Link Control panel reports “Total Hard Drive Capacity: -1 MB”!!!!!
Are all data lost? What went wrong here?
Hello, on DNS320L, i follow instructions but root password reset after a reboot.
it seem that store-password doesn’t work or i miss something…
regards
hi !
Have you done the store password step without errors?
That worked for me on the first try :/
Regards
Hi,
I need guide on setting up a different admin port(currently is 80) for DNS-320. Please help.
I would also like to know how to do this.
Hi,
I am trying to install ffp 0.7 onto a DNS-313 (fw 1.04) in order to then use the mediatomb package to work around known UPnP AV server bug.
After initial placement of the files onto the NAS and reboot I have following errors in the log file:
* Running /ffp/etc/fun_plug.init …
/mnt/HD_a2/fun_plug: /ffp/etc/fun_plug.init: Permission denied
* Running /ffp/etc/rc …
/mnt/HD_a2/fun_plug: /ffp/etc/rc: Permission denied
When I am trying to cd into HD_a2 it returns the message: can’t cd to hd_a2.
Appreciate your help!
Thx!
I would guess you need to chmod the .init file, but if you don’t have a shell… you should try through ftp to chmod the file to 777, to make sure it will work. about cd-ing to the HD_a2? try “mount” and see where the HD_a2 is mounted…
Awesome tutorial. going in with only basic Linux experience, this was very helpful.
However, I am having one problem. I am trying to setup lighttpd on my DNS-325 (with ffp 0.7) and I cant seem to get it to cooperate. I was able to get it to host a basic HTML test page however it would then disable the original configuration interface. I found another tutorial using ffp 0.5 (here) that references an “original” lighttpd.conf that is supposed to be included to preserve the original interface but that config file does not seem to exist in 0.7.
In short, How do I setup my lighttpd.conf file to run the original config (port 80) interface along with my personal hosting (port 8080)?
Hi there! Having the same problem, except I couldn’t even get the basic HTML test page, can you tell me how you did that, and maybe I can help you with the rest?
DNS-321. Managed to navigate the Telnet info, but when I open the second PuTTY window for the SSH session, it just sits there with the cursor, doing nothing. Can’t type input in. Any thoughts?
Hello all,
I’ve had my DNS 320 for some time now, but looking for more capability, have read through the forums to install fun plug, downloaded fun_plug and fun_plug.tgz, transferred to volume_1 rebooted the nas, but still cant connect to it with telnet to continue configuration. Log file below. Please help, i really want to find out what I Can do Many thanks
**** fun_plug script for DNS-323 (2008-08-11 tp@fonz.de) ****
**** fun_plug script modded by Uli (2012-02-21 ffp@wolf-u.li) ****
Sat Nov 10 17:17:34 EST 2012
ln -snf /mnt/HD/HD_a2/ffp /ffp
* Installing /mnt/HD/HD_a2/fun_plug.tgz …
tar: short read
rm: /mnt/HD/HD_a2/fun_plug.tgz: is a directory
/ffp/etc/rc: Not found or not executable
It looks like you have extracted the fun_plug.tgz
Put the two files fun_plug and fun_plug.tgz on the root of Volume_1, and make sure you do not have a folder named “fun_plug” or “fun_plug.tgz” already on there.
PS: the “tar: short read” sounds like a problem with your tgz. Try re downloading the fun_plug.tgz and putting it on the NAS again
Hi,
I’ve followed the insructions, but after reboot all files in /ffp/start/ are with full permitions(777). Generated keys for sshd are also with changed permitions, ssh doesn’t start with message logged key files are too open?!
Hello Vankov and Marco try to apply what i wrote earlier on this thread. That should solve your problem.
Regards,
Ced
Hi;
Does anybody now if there is a repository containing the texteditor joe?
Tried to compile it myself but have not had any luck with ffp 0.7 so far. Any tipps?
For (fun_plug 0.5 and 0.7 )
Hi, I have a Workaround for NOT use store-passwd.sh.
Instead use store-passwd.sh, I followed these steps:
.- pwconv
.- passwd
.- usermod -s /ffp/bin/sh root
.- mkdir -p /ffp/home/root/
.- usermod -d /ffp/home/root/ root
.- I tried LOGIN … OK.!
And then i DIDN’T USE ” store-passwd.sh ”
.- I went to web-interface –> tools –> Admin Password –> and I changed it! –> Save.
.- Reboot the NAS, and my root password was saved too.!!
When the NAS save the admin password, at the same time it save root password, because both are stored in the same files.
Bye.
————–
PD: I have a CH3SNAS with DNS-323 Firmaware 1.09.
HI Everybody,
I have read all of the Internet to install the first time fun_plug. BUT: it just doesnt work. I have DLINK 320, rebooted system 100 times with two correct files (as i downloaded it from here) in root of Volume_1. It doest not unpack the archive and I see no log files, no new folder, just nothig new, like I have not rebooted the system. I really appreciate you help guys. I dont know to do with it.
I will provide all additional info if needed.
Firmware 2.02
Under WinXP – did
Hi! Are you sure you put the files in the root of “Volume_1″ ? If they are anywhere else, they will not run. And if you don’t get a log, it seems that it is not even running. Make sure that the files are named exactly the same as in the tutorial, and they are put on Volume_1, then UNPLUG the DNS-320 and then turn it back on.
thank you.
I dont understand how to install all the packs included in 0,7 fun plug. how can i share folders with friends, giving them a link. how it works? Sorry for stupid questions, Im a newbie on it, this device was a present on a birthday.
installed under win xp, previously tried under 7 and was no result. now it is done.
all the same under XP works.
the second question is what to do next?:-) how can I get web access to my files stored on it?
thank you
You can get SSH access, through which you can install the packs
You will need PUTTY or some other terminal emulator. If you want to access your files, you can either use WinSCP for a secure FTP through SSH, or just use a normal FTP Client like Firezilla, Total Commander, or some other. If you are on the same network as the NAS, you can always use the SAMBA shares (windows shares) you just type \\ipaddressofnas into windows explorer. You can also use NFS or WebDAV, I have not tried them, but for example, you can probably forward ports to use WebDAV from somewhere other than on the same network. (You asked how to share with friends by sending them a link, I think you can only do this with WebDAV, or FTP)
Look around on the tutorials for installing packages, its all writen pretty neatly. If you have any questions, just ask, I can help you as well)
Good Luck!
While poking around in my DNS-325, I found a file /usr/local/modules/files/model which contains just the string ‘DNS-325′, which is checked at the start of /usr/sbin/system_init.
Does this file exist in other variants, if so could it be used to better customize the ffp start-up, eg select the appropriate directory tree?
I don’t have any other NAS boxes, so thought I would ask here.
This file also exists on the DNS-320!
I think BrightonGuy has a brilliant idea! The file could be checked, and the fun_plug script can be made more universal.
Hey BrightonGuy,
the file you speak of (/usr/local/modules/files/model) is generated.
It is also copied to /etc/model on startup (on my DNS-320).
The file is actually generated at startup using the following method…
[ The following information is based on my DNS-320, though I don't see why it should be different for you... =) ]
If you’re looking for some customization based on current configuration, check out the file:
/etc/NAS_CFG/config.xml
If you wan’t a neat way of reading this file (assuming you’re a little familiar with XML and the command line):
xmldbc -g ‘/path/to/config/option’
e.g. in the config.xml file, for me, there is an XML element with the Xpath:
/config/system_mgr/nfs/enable
with the value ’1′
Running:
xmldbc -g ‘/system_mgr/nfs/enable’
Would return ’1′.
So for your own example, you could run:
xmldbc -g ‘/hw_ver’
For me, returns ‘DNS-320′.
Happy customizing =)
Chris
Hello,
I want to install fun plug as well. But i placed the two files in Volume_1 but nothing happend. What can be the solution?
Try to do it under Win XP. and double check file extension. I have installed, but do not know what to do next with it.
I carefully all installation instructions.
Everything is ok. ssl connection ok, ok chpasswd first ssh connection ok.
But I reboot the nas and ssh connections = network error, connection refused.
The ssl connection is still active (though was disabled) but the security keys are no longer valid.
How to do?
Thank you.
Oups.
I forget configuration :
DNS320L, fun-plug 0.7
Thanks
after tests :
I chmod 700
-/ffp/etc/ssh
-/ffp/sbin/sshd
-/ffp/var/lib/sshd
There, I can start sshd.sh et access mnt/hd/hd_a2 with ssh protocol
But i must do that after all reboots of nas.
Why ? Thanks
Same as you
Hi, Couldn’t find my problem above, I hope someone can help.
Did install as described and rebooted. Log and /ffp created and contains: lib, share, start, tmp dirs. Log is as follows:
**** fun_plug script for DNS-323 (2008-08-11 tp@fonz.de) ****
**** fun_plug script modded by Uli (2012-02-21 ffp@wolf-u.li) ****
Tue Dec 25 09:09:41 EST 2012
ln -snf /mnt/HD/HD_a2/ffp /ffp
/ffp/etc/rc: Not found or not executable
My ffp dir does not contain a etc dir?
No telnet access so I can’t delete or add the missing dirs to /ffp dir without root access and start over.
What to do? Thanks,
Bob
Ok, got around this by putting the DNS-320 hard drive into a linux machine and removing the ffp folder and starting over. All is well.
Note: I tried using the win EXT2 driver from here: http://sourceforge.net/projects/ext2fsd/ to mount this drive in windows but couldn’t see the Volume_1 dir for some reason.
Ever onward!
Bob
EXT3 or EXT4
you won’t see the Volume_1 folder, because that is the mount name for the HDD. So if you open the HDD on linux, or with ext2fsd, then you will only see the contents of the HDD.
That is Volume_1.
you won’t see the Volume_1 folder, because that is the mount name for the HDD. So if you open the HDD on linux, or with ext2fsd, then you will only see the contents of the HDD.
That is Volume_1.
I already have fun_plug 0.5 on my NAS 320. Can I just place the 0.7 tgz file in root reboot and it will auto update?
Hey. Nice guide! Succesfully installed 0.7 on my dns-320. But ive ran into a little speed problem.. TELNET/SSH drops, or laggs very much, the whole box feels much slower. (Lagging a lot). Anyone got any ideas?
Keep up the good work and sorry for the crappy english
OK – this may be dumbest question here… That’s how I feel about my Linux knowledge. I followed steps above to install fun plug – didn’t see any problems gperforming it. I restarted NAS and logged (SSH) using my new password succesfully. There is new folder /ffp and log file named ffp.log ( Volume_1).
Some magic ? Should I see new icons in web interface ? Please help
And what now ?
Anyone ?
OK, I got it. Transmission performs fine.
Hi all,
thanks for your precious effort.
I’ve a problem.
I’ve done all correctly…No errors at all, after all the steps done, I was able to connect via SSH the first time I enable it, then I rebooted the NAS…but now i cant connect anymore SSH.
I always receive this message:
ssh: connect to host 10.0.1.19 port 22: Connection refused
i’ve store my pass, the key files were generated correctly.
Where am I wrong?
thank you so much.
D
Hi Uii,
I have followed all the above steps and all went well except for the ssh activation. I received the three key pairs but didn’t receive the warning. When trying to login again, I entered the password and it still showed no new mail as it was before. Can you please help?
Regards,
Moe
Hi and thanks for these instructions. I have a D-Link DNS320L on a Virgin Medea SuperHub. I got the SSH connection working via Putty by adding the following two lines (thanks ced):
chmod 700 /ffp/var/lib/sshd/
chmod 700 /ffp/etc/ssh/ssh_*
I then disabled telnet using the line:
chmod -x /ffp/start/telnetd.sh
Even after rebooting the NAS, I can still access the NAS via telnet via Putty. Have I missed something? Linux is not a strong area of my IT expertise. Thanks again
Ian
Hello ;
This command:
wget 192.168.0.10/u/172/ -O /ffp/sbin/store-passwd.sh
Give me:
Connecting to 192.168.0.10:80… connected.
HTTP request sent, awaiting response… 404 Not Found
2013-01-19 09:10:00 ERROR 404: Not Found.
It is not OK; what’s wrong, please ?
I cannot access the NAS remotely I found the file settings.json & edited it as root. I made the line “rpc-whitelist-enabled”: true, read “rpc-whitelist-enabled”: false, saved & rebooted but something then changes it back to true.
I also tried to edit “rpc-whitelist”: “127.0.0.1, 192.168.*.*”, to “rpc-whitelist”: “127.0.0.1, *.*.*.*”, but the same happened.
Alan…
Sorry I have just re-read what I put, what I should have said is I cannot access the web interface from outside my local network. The port forwarding is correct as if I switch it to another PC running transmission then I have access from anywhere.
Alan…
OK I was trying again last night & using the Transmission Manpage I found the answer, I was editing the file & then restarting, but you have t o stop Transmission, edit the file & then start it. Works this way.
Aln..
Hi all,
Have bit of a problem now with my DNS320!!
I wanted to install fun_plug and followed the steps as per the guide. Here is what I have done so far:
1. downloaded the two files fun_plug and funplug.tgz and placed into Volume_1.
2. Changed the permissions to chmod 777 fun_plug*.
3. restarted my NAS.
Problem: I cannot access my NAS anymore nor can I ping it. message: “unknown host” Even the web interface isnt woking.
Need your help please.
Thanks
Bill
Bill,
I suspect that you have DHCP on the NAS & it’s changed it’s address, can you browse your network or look on your router to find it? Then use a browser or the router to define a static IP
Alan…
Excellent!! that worked!
Cheers Alan.
I have just another minor issue. My ssh is now working just fine from my old machine (as I had set it up from this) but now I try to access my NAS from another PC and cannot connect and get connection denied.
Is there something that I need to repete on the new PC?
Cheers
Bill
I got this fixed now! It was a (stupidly) simple solution. It appears that there was a problem with the verion of PuTTy that I had downloaded. Used another client and it worked!!!
Cheers
B
Could somebody explain why is this happening that DNS-320L resets file permission on 777 after every reboot!? That makes all these problems with sshd and required keys.
Hi, great tutorial but I’m having the problem below:-
wget http://wolf-u.li/u/172/ -O /ffp/sbin/storepasswd.sh
–2013-01-26 00:00:19– http://wolf-u.li/u/172/
Resolving wolf-u.li… failed: Name or service not known.
wget: unable to resolve host address ‘wolf-u.li’
I’ve tried changing DNS1 and DNS2 to 8.8.8.8 as suggested but it’s made no difference.
Do you have any ideas as to what’s wrong?
Slacker also won’t work and I suspect it’s because the NAS is unable to resolve the external address.
I’m installing on a DNS-320.
Thanks in advance.
I’ve managed to sort my problem.
I changed the default gateway and dns to 192.168.1.254.
This has resolved my issue.
Hi, i get stucked a bit, finally managed to resolve the “resolve” problem but when i’m trying to run store-passwd.sh it gives
-sh: /ffp/sbin/store-passwd.sh: Permission denied
any idea?
thx
Pal
Installing fun_plug on dns-325.
I have found what appears to be a problem in start/sshd.sh. The test on whether to create an ECDSA key tests for the presence of /etc/ssh/ssh_host_ecdsa_key using the -f test, whereas all the other keys test a readable file in /ffp/etc/ssh/ssh_host…. using the -r test. The ecdsa key is created in the /ffp/etc/ssh directory, so subsequent restarts try to recreate the key file.
Correcting the line in sshd.sh fixes this
if [ ! -r /ffp/etc/ssh/ssh_host_ecdsa_key ]; then
Could this be corrected, or is there something I am missing?
need help installing ps3mediaserver – its tellingme imrunningoutofdisk space:
stepsi did:
1) install fun_fplug
2) install java embedded
3) download ps3media, unpacked it. now startingit gives me that:
INFO 2013-02-15 19:56:32.212 [main] Working directory: /mnt/HD/HD_a2/ffp/opt/ps3mediaserver/pms-1.72.0
ERROR 2013-02-15 19:56:32.305 [main] A serious error occurred during PMS init
java.io.IOException: Unable to create directory /tmp/ps3mediaserver
at org.apache.commons.io.FileUtils.forceMkdir(FileUtils.java:2384) ~[pms.jar:na]
——————Overview – DF
root@dlink:/mnt/HD/HD_a2/ffp/opt/ps3mediaserver/pms-1.72.0# df -h
Filesystem Size Used Available Use% Mounted on
rootfs 8.7M 8.7M 0 100% /
/dev/root 8.7M 8.7M 0 100% /
mdev 121.3M 0 121.3M 0% /dev
/dev/loop0 26.1M 26.1M 0 100% /usr/local/modules
/dev/mtdblock5 5.0M 460.0k 4.6M 9% /usr/local/config
none 2.0M 328.0k 1.7M 16% /mydlink
/dev/sda4 959.9M 33.3M 926.6M 3% /mnt/HD_a4
/dev/sda2 914.4G 414.0M 914.0G 0% /mnt/HD/HD_a2
>> how can i give fun_plug more space?
hint: in my windows explorer i see only Volume_1 with a subfoler called ‘ffp’, and others
thx
i dot understand the scripting part here. sorry i have placed the fun_plus.tgz and fun_plu file into my NAS folder volume 1. ive installed notepad++ and i opened the fun_plug file. i dont understand what i need to do next. can someone help me what is it that i need to change here in the script?
You don’t need to change anything in the script.
Best Regards,
Uli
After coppied 2 files (fun_plug and fun_plug.tgz) I put them on the root dir (Volume1) on my DNS-325, and restarted. Then used puty and try to Telnet to the NAS, but the connection closed right after it opens. Any idea?
I Can’t telnet to DNS-325 with puty on Windows7. The connection close as soon as i open it. Any idea?
Hi, i couldnt login via ssh anymore,it says this: “connection refused”
when i try to re-activate ssh :
sh-4.1# chmod a+x /ffp/start/sshd.sh
sh-4.1# sh /ffp/start/sshd.sh start
Generating public/private ecdsa key pair.
/ffp/etc/ssh/ssh_host_ecdsa_key already exists.
Overwrite (y/n)?
Starting /ffp/sbin/sshd
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0777 for ‘/ffp/etc/ssh/ssh_host_rsa_key’ are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: /ffp/etc/ssh/ssh_host_rsa_key
Could not load host key: /ffp/etc/ssh/ssh_host_rsa_key
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0777 for ‘/ffp/etc/ssh/ssh_host_dsa_key’ are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: /ffp/etc/ssh/ssh_host_dsa_key
Could not load host key: /ffp/etc/ssh/ssh_host_dsa_key
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0777 for ‘/ffp/etc/ssh/ssh_host_ecdsa_key’ are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: /ffp/etc/ssh/ssh_host_ecdsa_key
Could not load host key: /ffp/etc/ssh/ssh_host_ecdsa_key
Disabling protocol version 2. Could not load host key
sshd: no hostkeys available — exiting.
please help, i’d like to disable telnet, and using ssh.
thank you !
he guys, i got a problem,
when i try to test my root login this is shown
NAS login: root
Password:
No mail.
Cannot execute /fpp/bin/sh: No such file or directory
and if i try to login after ssh activation, access is denied.
can anyone help??
I would check the log to see if funplug has been installed and started successfully.
I’ve managed to mess up something in my DNS-325, fun_plug 0.7 and user accounts (or transmission).
Trying to start transmission results to:
root@dlink-6021E1:/ffp/start# ./transmission.sh start
Starting transmission-daemon
Couldn’t open “/ffp/var/transmission/transmission-daemon.log”: Permission denied
The same way:
root@dlink-6021E1:/ffp/start#su nobody -c “echo foo>> /ffp/var/transmission/foo.txt”
/bin/sh: cannot create /ffp/var/transmission/foo.txt: Permission denied
The permissions appear OK to me:
root@dlink-6021E1:/ffp/start# ls -l /ffp/var
total 16
drwxr-xr-x 6 root root 4096 Jan 22 2012 lib
drwxr-xr-x 3 root root 4096 Jan 13 2012 log
drwx—— 3 root root 4096 Mar 10 18:04 run
drwxr-xr-x 7 nobody root 4096 Mar 16 17:39 transmission
Checked also with:
root@dlink-6021E1:/ffp/start# /ffp/bin/su nobody -c “/ffp/bin/transmission-daemon -f -g /ffp/var/transmission”
[18:20:09.351] transmission-daemon Error loading config file — exiting. (daemon.c:491)
root@dlink-6021E1:/ffp/start# ls -l /ffp/var/transmission/settings.json
-rw——- 1 nobody allaccount 2336 Mar 9 12:51 /ffp/var/transmission/settings.json
I did manage to fill up / partition earlier (compiled stuff and results went to /lib instead of /ffp/lib). Before figuring that out, I removed some stuff from /tmp (isn’t that temporary space anyway, removing something there should not be a problem).
I’m out of ideas, why can’t user “nobody” write to a directory that is owned by “nobody”?
/etc/password lists nobody as:
nobody:x:501:501:Linux User,,,:/home/nobody:/bin/sh
I even went to create /home/nobody, didn’t help though.
Ideas, pointers?
What am I doing wrong?
For unknown reason /ffp/var which was owned by root had got it’s permission changed to 700, thus access to /ffp/var/transmission was not possible.
Fixed: chmod 755 /ffp/var
Install fun_plug 0.7 on DNS-320. Managed to get lighttpd to run. But when lighttpd is up, can’t log into the web admin. Can only login after stopping lighttpd.
Searched around online and read about kickwebs_dns320.sh, but only have kickwebs.sh in the ffp/start/ directory. Any suggestion to get both lighttpd and web admin login to work simultaneously?
By the way, lighttpd is NOT running on port 80 but set to run on another port. Why will it still conflict?
Thank you in advance.
I found this script below and add it into ffp/start/
******** kickwebs_dns.sh ********
#!/ffp/bin/sh
# PROVIDE: kickwebs_dns320
# REQUIRE: LOGIN
# BEFORE: lighttpd
. /ffp/etc/ffp.subr
name=”kickwebs_dns320″
start_cmd=”kickwebs_dns320_start”
stop_cmd=”kickwebs_dns320_stop”
kickwebs_dns320_start()
{
echo “Kicking webserver lighttpd …”
sh /ffp/start/lighttpd.sh stop
}
kickwebs_dns320_stop()
{
echo “Starting internal Webserver …”
sh /ffp/start/lighttpd.sh stop
/usr/sbin/lighttpd-angel -D -m /usr/local/lib -f /etc/lighttpd/lighttpd.conf
}
run_rc_command “$1″
******** End of script ********
Upon reboot, lighttpd running but still can’t access web admin. Here is the log.
**** fun_plug script for DNS-323 (2008-08-11 tp@fonz.de) ****
**** fun_plug script modded by Uli (2012-02-21 ffp@wolf-u.li) ****
Tue Mar 19 17:23:40 SGT 2013
ln -snf /mnt/HD/HD_a2/ffp /ffp
* Running /ffp/etc/fun_plug.init …
* Running /ffp/etc/rc …
* /ffp/start/SERVERS.sh inactive
* /ffp/start/portmap.sh inactive
* /ffp/start/nfsd.sh inactive
* /ffp/start/LOGIN.sh inactive
* /ffp/start/telnetd.sh …
Starting /ffp/sbin/telnetd -l /ffp/bin/sh
* /ffp/start/sshd.sh inactive
* /ffp/start/rsyncd.sh inactive
* /ffp/start/kickwebs.sh …
Kicking webs …
webs: no process found
* /ffp/start/kickwebs_dns320.sh …
Kicking webserver lighttpd …
Stopping lighttpd
* /ffp/start/lighttpd.sh …
Starting /ffp/sbin/lighttpd -f /ffp/etc/lighttpd.conf
* /ffp/start/inetd.sh inactive
* /ffp/start/fp_master.sh inactive
* OK
Any suggestions?
Hi Benji could you let us know how you got this working please? It would be very halpful and instructive
Hi, Benji! Could you please tell me how you managed to start lighttpd, and what port it is running on? I can’t get it to work at all. If you tell me how you got it to work, I might be able to help you with running it side by side with the web admin login
After install ffp, copy the ffp/etc/examples/lighttpd.conf into /ffp/etc/ and then edit the lighttpd.conf to point it to your server root directory
Whe editing the lighttpd.conf, make sure all the paths are changed from /mnt/HD_a2/ to /mnt/HD/HD_a2
Then enable lighttpd with this command:
chmod a+x /ffp/start/lighttpd.sh
Reboot DNS-320, done. Lighttpd running but can’t access web admin until lighttpd is stopped.
As for port, can specify any port to run inside lighttpd.conf.
strange, as far as I remember, I did these exact same things, but it would not run for me. Well will try again tomorrow when I have some time. Thanks for you reply! I will try to find a way to have them both running at the same time, just maybe on dif ports
Wish you success in getting your lighttpd up and running, and hopefully the web admin too. Await your sharing here if you managed to get both running together. Thanks.
Found solution to my problem of web admin login.
Hi Benji could you let us know how you got this working please? It would be very instructive
I assume you mean getting the wed admin to work. I added a scritp ffp/etc/fun_plug.local. Below are the lines inside:
################################
#!/ffp/bin/sh
PATH=/ffp/sbin:/ffp/bin:/usr/sbin:/sbin:/usr/bin:/bin
echo “Killing WebAdmin (lighttpd-angel/lighttpd)”
kill -9 `pidof lighttpd-angel`
kill -9 `pidof lighttpd`
echo “Starting custom lighttpd”
sh /ffp/start/lighttpd.sh start
echo “Restarting WebAdmin (lighttpd-angel)”
/usr/sbin/lighttpd-angel -D -m /usr/local/lib -f /etc/lighttpd/lighttpd.conf &
######################################
Reboot dns-320 and done. Can also disable the lighttpd daemon too.
Forgotten to mentioned that this script was given to me by a helpful forumer, j, in Hardwarezone. Credit should go to him.
Hi there, my DNS 320 looks like it needs twonky installing to fix the upnp interface since dlink broke it. I use amazon S3 storage function though. Can i expect this to work after i install fun plug and twonky?
Hi,
I did the steps above and managed to get SSHD up and running but when I reboot the NAS, the SSH daemon does not start up automatically. I did not disable telnet so that still works.
Any idea?
DNS-320L
I’ve been trying to install this on my DNS 320 (with latest firmware), have ensured the files are correctly named and have the right permissions but i get the following errors:
Thu Apr 4 11:02:43 BST 2013
ln -snf /mnt/HD/HD_a2/ffp /ffp
* Installing /mnt/HD/HD_a2/fun_plug.tgz …
tar: invalid gzip magic
/ffp/etc/rc: Not found or not executable
Seems to be Mac related, uploaded files from a pc and they worked…
Hi Uli,
I bought a dns-320L this week, I upgraded.
I use Raid1 and JBOL. funplug instalation unsuccessful. “Remote Backup” Services is deactivated. I copy these two file to volume 1 map. I rebooted but FFP directory not created. please help me what is it wrong in my case.
Cheers,
Jozsef
Hi Uli,
I bought a dns-320L this week, I upgraded.
I use Raid1 and JBOL. funplug instalation unsuccessful. “Remote Backup” Services is deactivated. I copy these two file to volume 1 map. I rebooted but FFP directory not created. please help me what is it wrong in my case.
Cheers,
Oti
Hi
I have a newby question. I want to run sshfs on a
DNS-320 with the raid1 structure. I believe I need
fun_plug for that. Does fun_plug modify the raid functionality of DNS-320 in some way? Is there
something I should take care of?
Thanks,
M.Natiello
simply want to thank you for your awesome tutorial, I don’t have any problem with the installation.
when i run “slacker -UaA uli:uwchmod”
it returns with
“No packages found (status Iiu, pattern (^uli:.*uwchmod))”
Any help?
Hey everyone with a DNS-323.. I have resolved all my issues here. The problem with this tutorial, is that the link for downloading funplug for DNS-323 (OARM) is outdated.. if you actually goto the OARM repository for fun plug, there is a note that it is obsolete, and to use the OABI instead.. so for anyone with a DNS-323 you should get the fun_plug tarball from here: http://www.inreto.de/ffp/0.7/oabi/
Hello Uli. I installed ffp on my new DNS-320L, about two months ago. It worked fine, but everytime system was restarted (three times proximately) some things start to behave strange:
Some weeks ago (1st restart):
- Every node on My Files (web access) appears with it whole path
- Admin lost some permissions on web interface.
And finally (2nd restart):
- admin is not able to connect on the web.
- time machine user is not able to connect to the system to back up.
And after that (3rd restart):
- DNS-320L seems unable to connect to router (or direct ethernet connection)
I’m absolutely lost. Is it possible to connect to NAS through USB or internal serial port pins?
Last option would be to restore to original factory settings, but does exists this option?
Sorry I mean restore to factory settings different from bottom side button that don’t seems to do anything
I have DNS-321, I installed the fun_plug, and got to the package install stage via SSH.
It said ‘downloading definitions’ shows on the bottom that it’s connecting to some IP, and then I get an error message :
“Selection aborted, program exists without modification to /ffp/etc/funpkg/sites”
any idea ?
I noticed a missing step is
cd /bin
mv sh sh_old
ln -s /ffp/bin/bash sh
Without this, the
$PATHseems to have/bininjected too early… And some scripts had problems with the original/bin/shHi!
I have installed the fun_plug without problems, but now when I try to connect using putty to the ip:
192.168.0.17 using SSH (port 22)
I just get a connection error…
I have also tried connecting via the telnet and that doesnt work either…
Is there any way I can connect other than reinstalling fun_plug`?
I have the same issue on my DSN 320. After reboot SSH connection is refused.
How can we do ?