DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2008-08-24 02:51:31

dsmturbo
Member
Registered: 2008-08-17
Posts: 9

Newbie, trying to install Fun_Plug

sorry to bother everyone, but I have been trying to install fun_plug on my Version 1.05 DNS-323 for a week now with no luck. I grabbed the script and the .tgz files (V .05) and placed them on root of my Volume_1. I have rebooted with web interface as well as rebooted the box itself with the power button. I get no folders created at all.
I have tried it with the files on my Volume_2 as well, thinking maybe the drives were misnamed, still nothing.

I have tried it by editing this:
# real path to ffp
FFP_PATH=/mnt/HD_a2/ffp

and replacing HD_a2 with HD_a4 ( I saw a post somewhere) but still no luck. Here is my funplug script file:

#!/bin/sh

# switch to safe working directory on ramdisk
cd /

# write a log, in case sth goes wrong
FFP_LOG=/mnt/HD_a2/ffp.log
#FFP_LOG=/dev/null
exec >>$FFP_LOG 2>&1

# real path to ffp
FFP_PATH=/mnt/HD_a2/ffp

# where to search for the install tarball
FFP_TARBALL=/mnt/HD_a2/fun_plug.tgz

# setup script (used for ffp on USB disk)
FFP_SETUP_SCRIPT=/mnt/HD_a2/.bootstrap/setup.sh

# rc file path
FFP_RC=/ffp/etc/rc


echo "**** fun_plug script for DNS-323 (2008-08-11 tp@fonz.de) ****"
date


# check for setup script. an example use for this is to load USB
# kernel modules and mount a USB storage device. The script is
# sourced, that means you can change variables, e.g. FFP_PATH to point
# to the USB device.
if [ -x $FFP_SETUP_SCRIPT ]; then
    echo "* Running $SETUP ..."
    . $FFP_SETUP_SCRIPT
fi

# create /ffp link
echo "ln -snf $FFP_PATH /ffp"
ln -snf $FFP_PATH /ffp

# install tarball
if [ -r $FFP_TARBALL ]; then
    echo "* Installing $FFP_TARBALL ..."
    mkdir -p $FFP_PATH && tar xzf $FFP_TARBALL -C $FFP_PATH && /ffp/bin/tar xzf $FFP_TARBALL -C $FFP_PATH
    if [ $? -eq 0 ]; then
        echo "* OK"
    fi
    rm $FFP_TARBALL
fi

# suid busybox
if [ -x /ffp/bin/busybox ]; then
    chown root.root /ffp/bin/busybox
    chmod 0755 /ffp/bin/busybox
    chmod u+s /ffp/bin/busybox
fi

# run fun_plug.init, if present
if [ -x /ffp/etc/fun_plug.init ]; then
    echo "* Running /ffp/etc/fun_plug.init ..."
    /ffp/etc/fun_plug.init
fi

# run fun_plug.local, if present
if [ -x /ffp/etc/fun_plug.local ]; then
    echo "* Running /ffp/etc/fun_plug.local ..."
    /ffp/etc/fun_plug.local
fi

# run commands
if [ -x $FFP_RC ]; then
    echo "* Running $FFP_RC ..."
    $FFP_RC
    echo "*  OK"
else
    echo "$FFP_RC: Not found or not executable"
fi

I must have something wrong, I haven't changed the script and the tgz file is 10463KB

Offline

 

#2 2008-08-24 02:56:55

dsmturbo
Member
Registered: 2008-08-17
Posts: 9

Re: Newbie, trying to install Fun_Plug

Newbie question, is the script file supposed to be named  fun_plug.sh  or no extention?

Offline

 

#3 2008-08-24 03:29:38

luusac
Member
Registered: 2008-04-29
Posts: 360

Re: Newbie, trying to install Fun_Plug

leave the files intact - no renaming is necessary.  You should place the 2 files (without uncompressing/editing) in the root of your share eg Volume_1.  so you should have fun_plug (*not* fun_plug.sh)and fun_plug.tgz reboot and it should install itself.  Give it a few minutes after reboot and look in the root for the ffp.log file and an /ffp/ directory.  I have never had to change HD_a2 to anything else (but then I see that fonz has recently changed the fun_plug, the last time I installed 0.5 there were no references to usb).  Did you change all instances of HD_a2 to HD_a4 ?
lu

Offline

 

#4 2008-08-24 05:52:25

bq041
Member
From: USA
Registered: 2008-03-19
Posts: 709

Re: Newbie, trying to install Fun_Plug

Did you make sure the files had the correct permissions on them (i.e. - fun_plug is executable)?


DNS-323     F/W: 1.04b84  H/W: A1  ffp: 0.5  Drives: 2X 400 GB Seagate SATA-300
DNS-323     F/W: 1.05b28  H/W: B1  ffp: 0.5  Drives: 2X 1 TB  WD SATA-300
DSM-G600   F/W: 1.02       H/W: B                Drive:  500 GB WD ATA

Offline

 

#5 2008-08-24 09:01:37

dsmturbo
Member
Registered: 2008-08-17
Posts: 9

Re: Newbie, trying to install Fun_Plug

I left the files intact the way they are. I didn't check to see if they have correct permissions, no idea how to do that. I have tried this 10-12 times already and never get any ffp folder

Offline

 

#6 2008-08-24 10:42:02

bq041
Member
From: USA
Registered: 2008-03-19
Posts: 709

Re: Newbie, trying to install Fun_Plug

Did you get a file called ffp.log?


DNS-323     F/W: 1.04b84  H/W: A1  ffp: 0.5  Drives: 2X 400 GB Seagate SATA-300
DNS-323     F/W: 1.05b28  H/W: B1  ffp: 0.5  Drives: 2X 1 TB  WD SATA-300
DSM-G600   F/W: 1.02       H/W: B                Drive:  500 GB WD ATA

Offline

 

#7 2008-08-24 23:56:53

dsmturbo
Member
Registered: 2008-08-17
Posts: 9

Re: Newbie, trying to install Fun_Plug

No log file created that I can see anyway. I hyst don't know, my friend did the exact same on his box and it installed 1st time.

Offline

 

#8 2008-08-25 00:20:18

jalin2
Member
Registered: 2008-08-24
Posts: 6

Re: Newbie, trying to install Fun_Plug

As a debug suggestion, you may want to have just one drive installed for now to eliminate the variable of which volume is HD_a2.

Offline

 

#9 2008-08-25 01:14:58

luusac
Member
Registered: 2008-04-29
Posts: 360

Re: Newbie, trying to install Fun_Plug

dsmturbo wrote:

I left the files intact the way they are. I didn't check to see if they have correct permissions, no idea how to do that. I have tried this 10-12 times already and never get any ffp folder

What O/S are you using?  If windows, right click the two files and choose properties -> security (this is for vista, but probably the same for xp and 2000) and tell us what permissions have ticks next to them, eg read & execute, read, write etc as well as for which user, eg everyone, nobody, root.

Try enabling the ftp server via web interface, ftp in, enter "ls" and make sure that you can see the two files and then try

"quote site chmod 777 fun_plug"
"quote site chmod 777 fun_plug.tgz"

at the ftp prompt. disconnect and reboot, again wait a while as the first time it is run ffp has to uncompress/install itself.

lu

Offline

 

#10 2008-08-25 03:27:44

dsmturbo
Member
Registered: 2008-08-17
Posts: 9

Re: Newbie, trying to install Fun_Plug

luusac, thanks for all the info and assistance. In windows it shows user everyone has all checked except Special Permissions. User Noboy and 501 Unix also have the same permissions.

I have been trying Flashfxp, I can log in but when I issue those commands under Commands, raw command quote, and I enter  site chmod 777 fun_plug.tgz  I get not allowed, no permissions...operation not permitted.

is there another ftp program I could try. I apologize but I am so new to this stuff, even ftp'ing and telnet ing.

Offline

 

#11 2008-08-25 04:28:08

bq041
Member
From: USA
Registered: 2008-03-19
Posts: 709

Re: Newbie, trying to install Fun_Plug

go to the command prompt and type ftp


DNS-323     F/W: 1.04b84  H/W: A1  ffp: 0.5  Drives: 2X 400 GB Seagate SATA-300
DNS-323     F/W: 1.05b28  H/W: B1  ffp: 0.5  Drives: 2X 1 TB  WD SATA-300
DSM-G600   F/W: 1.02       H/W: B                Drive:  500 GB WD ATA

Offline

 

#12 2008-08-25 04:55:12

luusac
Member
Registered: 2008-04-29
Posts: 360

Re: Newbie, trying to install Fun_Plug

dsmturbo wrote:

is there another ftp program I could try. I apologize but I am so new to this stuff, even ftp'ing and telnet ing.

I am not familiar with the ftp program you are using, so am not sure how you should enter the command given, but there is a command line (non graphical) ftp client built in to windows, go to a dos(command) prompt and type
ftp xxx.xxx.xxx.xxx
where x is the ip address of your dns323.

However the permissions you give look right, if they are Read,Write,eXecute, for everybody/world, it should run ok.  What you can try after you have logged on using the windows command line ftp and issued the chmod command in the previous post against the two files and if it still fails, try uploading the files again:

1. delete fun_plug and fun_plug.tgz from Volume_ and Volume_2; download fun_plug and fun_plug.tgz from http://www.inreto.de/dns323/fun-plug/0.5/ to a directory in the root of your c: drive, say c:\ffp (do it again just in case something is wrong with the files you downloaded)
2. at command prompt type: ftp xxx.xxx.xxx.xxx (where x=ip address)
3. type "lcd c:\ffp" (to change dir to where the two files are stored on your hdd) (don't enter the "quotes" for any of the commands)
4. type "cd Volume_1" (to change to the root of your dns323 drive - this assumes when you enabled the ftp server you set the login folder to root - a tick box)
5. type "put fun_plug" (to transfer the file)
6. type "bin" (to make sure binary transfer)
7. type "put fun_plug.tgz" (to transfer the file)
to put the files on Volume_2 as well, type "cd .." and repeat steps 4-7 once you have done the whole procedure, but in step 4 change "Volume_1" to "Volume_2" :-)
8. type "quit" - you will be back at the dos prompt. reboot the dns323 and try again.  Try changing the permissions again from the dos ftp client.
remember to disable the ftp server via the web interface once you have done.

If all that fails, you can try installing just telnet, see the telnet how:to on the wiki and see if you can get into the box then, or an earlier version of ffp (eg. 0.4)
lu

Offline

 

#13 2008-08-25 08:39:22

dsmturbo
Member
Registered: 2008-08-17
Posts: 9

Re: Newbie, trying to install Fun_Plug

Thankyou so much luusac and bg041, it seemes to have worked this last time. I followed what you so graciously posted as above and now I have a ffp folder and a ffp.log along with fun_plug in root of volume_1. I would imagine I can delete fun_plug from the root?

I didn't realize vista had a ftp builtin and it took me 4 or 5 tries to get the ftp server to allow me access to and change file permissions. I did try once here to telnet in and it seems to let me, now just have to read up and see what I can do with it now.

Again, all my thanks
Bryan

Offline

 

#14 2008-08-25 10:07:49

Mijzelf
Member / Developer
Registered: 2008-07-05
Posts: 709

Re: Newbie, trying to install Fun_Plug

I would imagine I can delete fun_plug from the root?

No. It is still needed to start ffp at each boot.

Offline

 

#15 2008-08-25 13:39:42

luusac
Member
Registered: 2008-04-29
Posts: 360

Re: Newbie, trying to install Fun_Plug

As Mijzelf said, you need to leave fun_plug there - think of it as autoexec.bat (if you remember the old dos/windows days) - this is what sets up ffp for use every time you turn on your dns-323 - without this file the files in /ffp will just sit there and no nothing, you may have noticed that the .tgz file is no longer there - this is normal.  Now it is installed and working, consider setting a root password for telnet and replacing telnet with ssh (a secure equivalent) .  Follow the instructions on the wiki ffp:how to the letter if you decide to do this, it is straightforward, but if you miss a step you may end up with problems (remember specifically to use the store password script once you have tested the login).  Also disable ftp for security reasons.  Make sure your router blocks telnet/ssh  (etc) (these will probbaly be disabled/blocked as default) so that you are not exposing your dns323 to the world unless you are happy with the security that you have put in place.
lu

Offline

 

#16 2008-08-27 19:52:46

dsmturbo
Member
Registered: 2008-08-17
Posts: 9

Re: Newbie, trying to install Fun_Plug

Thank so much guys and gals. I will look in to ssh equivalent of telnet. If my router blocks telnet/ssh how will I get in to the box

Offline

 

#17 2008-08-27 20:21:43

luusac
Member
Registered: 2008-04-29
Posts: 360

Re: Newbie, trying to install Fun_Plug

dsmturbo wrote:

If my router blocks telnet/ssh how will I get in to the box

By unblocking it :-)  You will need to login to the router management interface - usually a web page, to change these settings.  But you need to distingush between your home-network side of the router and the internet/outside world side.  Telnet, ftp and ssh (etc) on your side will probably be open, but on the internet side they will be closed.  This is important as it stops somebody from outside seeing your network (a firewall).  When (if) you want to connect to your dns323 from away from home, eg for file transfer etc, you will need to forward the relevant ports from your router to the dns323/ or other device/computer on your network or any connection attempt will be blocked.
lu

Offline

 

#18 2008-08-28 03:51:26

dsmturbo
Member
Registered: 2008-08-17
Posts: 9

Re: Newbie, trying to install Fun_Plug

Okay I got it, thanks. Running a dlink DIR-655. It seems now that when I log in to DNS-323 from web login, the ftp server is running. Is that due to funplug...the ftp server will run by default?

Offline

 

#19 2008-08-28 04:07:11

luusac
Member
Registered: 2008-04-29
Posts: 360

Re: Newbie, trying to install Fun_Plug

dsmturbo wrote:

It seems now that when I log in to DNS-323 from web login, the ftp server is running. Is that due to funplug...the ftp server will run by default?

No it is not.  look in ffp.log in the root of your disk to see what ffp is actually running. eg:

**** fun_plug script for DNS-323 (2008-04-13 tp@fonz.de) ****
Wed Aug 27 10:44:22 GMT 2008
* Running /ffp/etc/rc ...
* /ffp/start/usbmount.sh inactive
* /ffp/start/rcS.sh ...
* /ffp/start/passwd.sh ...
Saving /etc/passwd to /etc/passwd.orig ...
Changing shells: /bin/sh -> /ffp/bin/sh ...
Updating /etc/shadow ...
* /ffp/start/shells.sh ...
* /ffp/start/syslogd.sh inactive
* /ffp/start/SERVERS.sh inactive
* /ffp/start/usbdisk.sh inactive
* /ffp/start/portmap.sh inactive
* /ffp/start/unfsd.sh inactive
* /ffp/start/nfsd.sh inactive
* /ffp/start/ntpd.sh ...
Starting /ffp/bin/ntpd -g -f /ffp/etc/ntp.drift
* /ffp/start/LOGIN.sh inactive
* /ffp/start/telnetd.sh ...
Starting /ffp/sbin/telnetd
* /ffp/start/sshd.sh ...
Starting /ffp/sbin/sshd
* /ffp/start/rsyncd.sh inactive
* /ffp/start/mediatomb.sh inactive
* /ffp/start/kickwebs.sh inactive
* /ffp/start/lighttpd.sh inactive
* /ffp/start/inetd.sh inactive
*  OK

"inactive" means that the script (which may start a service) on that line is present on disk (/ffp/start) but that it is not set to run.  A "Starting" entry means that the associated script was run (or I guess attempted to be run) by ffp.  To change whether services start and stop on boot you need to change the permissions of the individual scripts in /ffp/start (well that is the easyest way at least).  Search the forums/wiki on how to do this.  Leave fun_plug alone though, if you rename, move or delete it, ffp will stop working (until you restore that file).

You will have enabled ftp via the web interface earlier on when you were having problems installing ffp.  Indeed I suggested that you do so.  Now everything is working, if you don't need ftp disable it (via web interface).  There are more secure alternatives, and as the dns323 is running samba you don't need to use ftp to see your dns323 and work with the files/directories on it via windows explorer.
lu

Offline

 

#20 2008-08-28 20:11:18

dsmturbo
Member
Registered: 2008-08-17
Posts: 9

Re: Newbie, trying to install Fun_Plug

Again thankyou luusac and sorry to take up your time. You are a very patient person.
Bryan

Offline

 

#21 2008-08-28 21:06:16

luusac
Member
Registered: 2008-04-29
Posts: 360

Re: Newbie, trying to install Fun_Plug

you are very welcome!

Offline

 

#22 2008-09-16 17:56:41

ecapuano
New member
Registered: 2008-09-16
Posts: 3

Re: Newbie, trying to install Fun_Plug

I was experiencing the same issue above, I was only able to get fun_plug to install properly by placing it on Volume_2. It properly unpacked and runs off of Volume_2, is this ok? I have properly connect via Telnet and setup SSH, deactivated telnet, etc.... So I'm hoping all is well, does anyone think I'll have an issue with it being on Vol 2?? I am kind of fond of the idea since Volume_1 is almost full with movies etc, I want to use Vol 2 for BT and other frequent access items. Will fun_plug have any issues in the future being on Vol 2 though? Thanks guys! I can tell I am going to frequent this forum often smile I love my new NAS, I am a storage junkie smile

Offline

 

#23 2008-09-18 01:41:07

bq041
Member
From: USA
Registered: 2008-03-19
Posts: 709

Re: Newbie, trying to install Fun_Plug

I was experiencing the same issue above, I was only able to get fun_plug to install properly by placing it on Volume_2.  It properly unpacked and runs off of Volume_2, is this ok?

Yes it is.  Volume_2 is only a Samba share name that points to a drive, it is not the actual drive.  Fun_plug always runs from from /mnt/HD_a2, which is the first drive loaded by the dns (drive 0).

Last edited by bq041 (2008-09-18 01:42:07)


DNS-323     F/W: 1.04b84  H/W: A1  ffp: 0.5  Drives: 2X 400 GB Seagate SATA-300
DNS-323     F/W: 1.05b28  H/W: B1  ffp: 0.5  Drives: 2X 1 TB  WD SATA-300
DSM-G600   F/W: 1.02       H/W: B                Drive:  500 GB WD ATA

Offline

 

#24 2008-09-18 05:12:11

ecapuano
New member
Registered: 2008-09-16
Posts: 3

Re: Newbie, trying to install Fun_Plug

Is this maybe due to installing the drives backwards? I put my first 1TB drive in the left bay before later installing another in the right bay... Not sure if this could be the cause?

Offline

 

#25 2008-09-20 01:27:40

bq041
Member
From: USA
Registered: 2008-03-19
Posts: 709

Re: Newbie, trying to install Fun_Plug

Yes, this is exactly the cause.


DNS-323     F/W: 1.04b84  H/W: A1  ffp: 0.5  Drives: 2X 400 GB Seagate SATA-300
DNS-323     F/W: 1.05b28  H/W: B1  ffp: 0.5  Drives: 2X 1 TB  WD SATA-300
DSM-G600   F/W: 1.02       H/W: B                Drive:  500 GB WD ATA

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB