uwchmod: Fix for a issue with the firmware of some D-Link Devices

Since quite a while i am told that certain devices of D-Link have a bug in their firmware. This bug sets chmod 777 on all disks on reboot which prevents the fun_plug on these devices to start properly. SSH-Server is not starting and all other services are started which uses a lot of resources.

To prevent that bug, i have developed a solution which is based on the idea of KyleK My Package replaces /bin/chmod by a script which checks if it is called with 777 and on a directory of the harddisks (/mnt/USB/USB* or /mnt/HD/HD*). If that happens, this is prevented. If the command is a normal one, it is executed.

Important Note: With Non-Dlink-Devices the installation is simply not executed, on these it is no issue to install that script as it simply doesn’t execute.

Now install the package from my repository (Attention: This will fail on OABI Devices as it is not required there! Simply skip this step then!):

slacker -UaA uli:uwchmod

Thats it 🙂

Hint: If you upgrade your firmware, you need to reinstall the script as it is removed during such a upgrade.

31 thoughts on “uwchmod: Fix for a issue with the firmware of some D-Link Devices”

    1. Generally yes, but the package is only ready for 0.7. You would need to change it to 0.5 yourself as i am no longer supporting 0.5.

      1. Of course, understand.
        I am not planning to update funplug to 0.7 but I am curious. Is it big deal update funplug? What about backward compatibility?

        1. Well depends on how much you use fun_plug. If you have just used it to install twonky, it should be done quickly. Otherwise you should think thoroughly about what you are doing 🙂

          Generally you need to erase fun_plug completely and need to install 0.7 fresh. No upgrade possible.

          1. I am using transmission, some own scripts for temperature control and plot, rsync and sometimes pyLoad.

          2. hmmm, i don’t know about transmission, but i think there is a package available in other repositories. The scripts and plot should be possible. Rsync and pyload as well. So i guess this is possible. You could test it:
            – Rename the folder “ffp” and the file “fun_plug”)
            – Install ffp 0.7, try what you can or cannot do
            – If not successful, remove ffp 0.7 and rename 0.5 back to the old names.

      1. Hi Bertgr,
        this script is inspired by KyleKs script, but does not only fix the USB drive chmod 777 but also for all disks. So there is a difference in the features.

        Best Regards,

        1. I know, but because Gyngy explicit asked for 0.5.
          I haven’t seen your script yet cause I’m also still on 0.5 (using Kylek’s with some own modifications) and don’t know how to download with slacker.
          Soon upgrading 😉

          1. Yes, I am using KyleKs script as well.
            Before I had own – saving all attributes into file and applying during boot 😉 Very ugly solution.

  1. This is a bit off topice. I could not get mysql to load properly on a Dlink DNS-323 with funplug 0.7, so I went back to 0.5. The instructions for 0.5 / mysql are very clear, step by step. Perhaps you might update similar instructions for 0.7 / mysql (if you have the time). All the best.

    1. I had the same issues as you..

      The problem was within this tutorial for installing fun_plug 0.7 on DNS-323.. the download link is not correct for the fun plug, you need to use the repositories from here: http://www.inreto.de/ffp/0.7/oabi/

      then you can follow these instructions for installing mysql 5.1.61-oarm: https://nas-tweaks.net/96/installation-and-configuration-of-mysql-on-fonz-fun_plug/ however instead of using funpkg to install, just use slacker -Ui and select the mysql package.. then you can follow the rest of the tuturial, and should work no problem.. one additional change I had to make was to edit my.cnf in /etc folder.. change skip-locking to skip-external-locking after that the rest of the tutorial worked no problems

  2. when installing obai mysql-5.1.61 – do I need to install other packages as well?.. i found that If I install uclib that it gets past the error of not finding libn.so when running mysql_install_db, however when I run mysqld.sh i get a segmentation fault, and then when i reboot my DNS-323 I can no longer SSH.. could this be because the uclib is not the correct install? please help for what needs to be installed to have mysql 5.1.6x installed correctly.

  3. Hi,

    root@host:~# slacker -UaA uli:uwchmod
    Updating package lists…
    fetch: rsync -q ‘rsync://ffp.inreto.de/ffp/0.7/arm/packages/CHECKSUMS.md5’ ‘/ffp/funpkg/cache/s’
    No packages found (status Iiu, pattern (^uli:.*uwchmod))

    Is it not there anymore?

  4. Hi everybody,

    i have the same question as Zak did have. I cannot imagine that the information “no packages found” quite correct is. The script is not installed correctly, isn´t it!?

    Please help with statement.

    Thanks a lot. Best regards Robert

  5. May be I am in this case: I fail to have my DNS 320 run the fun_plug script at all.

    I bought it a week ago and the hardware revision is B1, not any of the the A-series. No other firmware exist to date on the DLINK site. Previously I was running a chrooted debian on a DNS 323 with no trouble (until a nasty thunder strike). But this 320 (not the L serie neither) is getting on my nerves — I sorely miss my cvsd… :p

    Obviously I triple checked everything, chmod, both drive roots, hard reboot… whatever I try it won’t run.

    Now I understand you may have pinpointed the issue — but how can I replace the stock /bin/chmod if I am not yet able to telnet to it nor run run fun_plug in the first place?

    thanks for your work!

      1. To me the problem from above looks as if you need to place the fun_plug on both disks, maybe just the other Volume is needed. But the problem is certainly not within chmod…


          1. Thanks Uli for the suggestion. I also tried to place the script on both drives at the time, only to make sure I did not use the wrong drive. It did not help either.
            Actually I left my NAS unused since I bought it, but I should try and give it a second try because it is a pity.
            I find it unlikely that there would be a tiny batch of un-modifiable hardware… I could try to solder directly to serial link and fiddle with the boot… not so user friendly! :s

      2. Did you two update to the latest Firmware? I had that once – but unsure where that came from. The files on the disks remain untouched?


  6. j’ai un gros probleme j’ai acheter un dns-325
    j’ai fait l’installation complete cela a bien marcher si je vais sur explorer et je tape l’adresse ip je peut me rendre dessus et faire admin et mot de passe c’est la mon probleme a l’interieur je n’ai rien qui s’afiche juste favoris , logiciel , management mais rien aucun icone de programme rien je ne peut rien faire comment fair une mise a jour du firmware sous Windows par l’exterieur svp aider moi quelqu’un

  7. I have a big problem I buy a dns-325 I made this full installation to walk if I go to explore and I type the IP address I can make it and make me admin and password this is my problem was inside I have nothing that just playing favorites, software management, but nothing any program icon nothing I can not do anything how fair a firmware update Windows by please help me someone outside

Leave a Reply

Your email address will not be published. Required fields are marked *