D-Link Forums
The Graveyard - Products No Longer Supported => D-Link Storage => DNS-321 => Topic started by: jemmrich on February 17, 2010, 11:48:59 AM
-
Hi everyone,
Trying to install fun_plug on the DNS-321. Anything that I have found says it works for the DNS-321, but instructions always call it by DNS-323.. But anyways...
I have downloaded and copied fun_plug and fun_plug.tgz into \\mynas\Volume_1\ and used the administration web page to reboot the system.
The files are still there, and telnet doesn't work. I also don't have any newly created directories.
I am running firmware 1.03.
Any ideas?
Thanks!
-
Did you follow the installation steps here?
http://nas-tweaks.net/CH3SNAS:Tutorials/fun_plug
-
I sure have, Doesn't seem like it did anything.
Could it be a permission issue?
Is there any way to test to see if it gets executed? Maybe I could add a command in the fun_plug file like so:
touch /mnt/HD_a2/fun_plug_started
Then I would at least be left with a notification that it ran. Any ideas?
-
Does the log file get created? If not, you aren't really running it. You should NOT have modified the fun_plug script with a Windows text editor.
-
No nothing results.
I even tried the following command right after #!/bin/sh thinking that the touch command may not exist.
echo "hello" > /mnt/HD_a2/test
-
I installed this on a DNS-323 and it worked fine. I removed it when I thought it was causing a lack of hibernation, but apparently it was not the culprit. Haven't installed it on my DNS-321...
-
Hello,
I tried to find an easy way to install this on my DNS-321 as well. I finally came across these instructions http://nas-tweaks.net/CH3SNAS:Tutorials/fun_plug (http://nas-tweaks.net/CH3SNAS:Tutorials/fun_plug) I followed them and had no problems what so ever. Maybe try these and see if it works for you. I am running firmware 1.03 and fun_plug just fine.
-
Those are the instructions I was following.
The tar is not corrupt as I can open it without error. I just can't seem to get the system to read the script file. Also being that my echo/touch commands never produced any file output leads me to believe that the firmware isn't even looking for the fun_plug script.
When I did the firmware upgrade I don't think I did "Factory defaults" after. Could this be the problem? I now have about 100GBs of data on the system and am afraid to touch those system commands.
I run Linux locally as well so regarding line breaks in the script file should not be an issue.
-
That was the very next thing I was going to recommend! :D
Reset to factory defaults and I suspect it'll load.
-
So if I do a factory defaults, will that just reset the device settings? Or do I have to move all my data off the drives?
-
The data will survive the reset, you will have to reconfigure all the stuff you've configured on the NAS.
-
Okay, I did a factory defaults and still no dice :-\
Do I have to set file permissions? I know I have firmware 1.03 because it says it in the top right and on the Tools > Firmware page.
The fun_plug file is just not being executed.
-
Well, the beta versions also said 1.03, are you sure you have the "final" version? Check the firmware page.
Current Firmware Version : 1.03
Firmware Date : 08/17/2009
-
Yep, same date.
Any other ideas? So strange!
-
As I said, I haven't actually installed this on the DNS-321, but I was of the opinion that it worked the same as the DNS-323, where it works seamlessly. Apparently, it's working for Fritter.
-
So I take it when you reboot the machine the ffp folder doesn't show up? Seems like you said, the file isn't executing. My drives are formatted in ext2 maybe that has something to do with it? Not sure.
-
Well, I just copied the two files to Volume_1 and restarted it from the menu, ffp is loaded and running. I'm not sure what you're doing wrong, it was painless. :)
-
Oh, my drives are formatted EXT2 and I'm running RAID-1 on the box.
-
Mine are also formatted ext2 and in Raid1.
What would happen if I pulled out my 2 1tb drives that are in it now, and put in 2 clean 120gb drives and do a whole new install?
Would I lose my data when I try to put the 1tb drives back in after the test? Or does that .bootstrap folder hold all the settings for the NAS and therefore everything would be back to normal when I replace the drives?
Reason I would like to try it on my two 120gb drives is to do a complete fresh install and see if that works. If it does I will need to do a lot of data shifting lol.
Thanks guys for all your help so far, let me know what you think.
-
I'm not entirely sure what happens in this case, I've thought about doing that for some experiments as well. :) I'll wait until someone that has actually done this comments.
-
Hey guys,
I followed the steps in http://nas-tweaks.net/CH3SNAS:Tutorials/fun_plug as well and it worked for me, I was able to telnet (and later disable it) and got ssh running on the DNS-321. Now the question is what do you want to do after that? I meant over and above the provided servers (ftp, uPnP, itunes etc.)
-
Personally, I eventually want to have a web server running, I'm just frying other fish right now. :)
-
lighttpd from ffp does its job, I got it running and it's cool. I might try to load apache (or write/find a ligth version) to handle mutliple websites. I start to like the DNS-321 with its all-in-one ftp/web server capabitilies (with tweaks), so far it saves me a linux box to put to some other uses.
-
I just don't want a full computer sitting there running 24/7, so I figure that running my little web page on the NAS would be a better option.
-
It depends, the DNS-321 has 14VDC, 7.89A therefore consumes about 110watts, my linux box has a small PS consuming only 60watts. So if we talk about electrical bills, the linux box beats the DNS-321 in terms of both functionality and $.
-
You are looking at the max rating of the P/S and assuming that is the power consumption. Nothing could be farther from the truth. ;)
My DNS-321 uses between 5-6 watts in standby, and 15 watts with both disks being accessed. I'm not sure how you managed to come up with that kind of P/S, both the DNS-321 and DNS-323 ship with a dual-rail P/S 12V/3A and 5V/3A. I don't know what you have, but it's sure not a stock DNS-321 P/S! ::)
-
It depends, the DNS-321 has 14VDC, 7.89A therefore consumes about 110watts, my linux box has a small PS consuming only 60watts. So if we talk about electrical bills, the linux box beats the DNS-321 in terms of both functionality and $.
What....lol.
7.89A? The only device that runs that is the DNS-343. Even then I don't think the device is consuming 110 watts of power...
-
well, last I checked your site it's the same spec (DC14V, 7.89A)
ftp://ftp10.dlink.com/pdfs/products/DNS-321/DNS-321_ds.pdf
ok, I will go home and pull the P/S out of the closet to really look, sorry for any misunderstanding since I quoted what dlink has on website vs what I have as PS.
-
I have not only checked the actual P/S on my DNS-321, I have also connected it to my power monitor and actually measured the real power consumption in standby and active operation. ;)
The data sheet does indeed have that oddball specification on it, I have no idea what that's about, since it's not even close to reality. :D
-
Thanks, John, I trust you and now stand corrected, the DNS-321 with 15watts is decent and certainly beats my linux box and I am happy. You are now upgraded to GuruJohn ;)
-
Thanks, John, I trust you and now stand corrected, the DNS-321 with 15watts is decent and certainly beats my linux box and I am happy. You are now upgraded to GuruJohn ;)
Can I add that to my profile? ;)
-
sure, John :D
-
The last time I brought up the topic of fun_plug, Mr "D-Link Multimedia" decried it as an insidious hack, having no place on these forums.
I'm glad whoever is hiding behind "D-Link Multimedia" has changed his stance on the issue.
-
Well, I think it's more of a case of ignoring it. :)
Since I've done tech support in the past, I can understand their viewpoint. When you add fun_plug, you add a host of variables, and then when you come to D-Link for support, it makes their job a lot more difficult.
-
itried to install fun plug could not get it to work. I decided to take break and work on something else like installing the p2p addon. I previously had installed this add on and removed it. When I tried to install the addon again I get and error saying "Install failed. Please check the hard drives." any suggestion?
-
I'd suggest looking in a different place, since this is not a D-Link supported option. Try http://wiki.dns323.info/howto:fun_plug (http://wiki.dns323.info/howto:fun_plug)
-
This guy really helped me out with my DNS 321. I used the wiki to install funplug and used his link to install nzbget and nzbgetweb (which I couldn't get working using the same version I installed on my DNS 323). Working great now to download my nzb's!
http://www.aroundmyroom.com/2009/11/14/just-a-howto-for-a-tweaker
If you are planning on installing nzbget and nzbgetweb, make sure you use this version:
http://www.aroundmyroom.com/newsbin/newsbinch3mnas-v31-a.tgz
The DNS 321 uses the 'ch3mnas' version NOT the 'ch3snas'.
-
I ran into exactly the same problem as jemmrich has. Fun_plug just won't get executed.
Any solution/suggestion?
Thanks
-
I have three DNS-321's. Two ran fun_plug with no problems and the third would not work. I determined that on the non-working NAS, the Volume_1 drive was actuallly /mnt/HD_b2 and Volume_2 was /mnt/HD_a2. I copied the fun_plug script and tgz file to Volume_2. Problem solved.
Try putting fun_plug on the Volume_2 drive.
-
I likewise have been struggling with getting the fun_plug install to run. Reformatted from RAID1 to Standard, tried ext2 instead of ext3, physically swapped drives, put software on both drives, verified repeatedly that names and downloads were correct. Finally decided to put down the MacBook and work on the Windows XP machine ... and behold, I discovered my Mac was putting those stupid 'resource fork' files in the DNS-321, which begin with a dot and presumably Linux was interpreting them as hidden files and trying to execute them. Maybe? Anyway, I started from scratch using Windows, and it worked on the first try.
Still don't have telnet connection, but at least fun_plug is running!
-
I'd say if telnet doesn't work, I question if fun_plug is actually running. That comes up "right out of the box" when it's running.
-
I'd say if telnet doesn't work, I question if fun_plug is actually running. That comes up "right out of the box" when it's running.
Well something is running, after all something has to be running to turn off telnet (unless telnet was turned off from the admin console). ;)
-
Telnet is not enabled with the stock box, so it's absence is no indication of fun_plug running.
-
My DNS-321 uses between 5-6 watts in standby, and 15 watts with both disks being accessed.
My results were similar to John's but slightly higher. 8 watts at idle, 25 watts with the drives actively doing read-write operations. The difference is probably the drives. I am using 2 Seagate 1.5TB drives. Any way you slice it, these are far cheaper than PCs if you need some services running and don't mind the slow spin-up and slow transfer speeds.
-
I have a Synology DS209 NAS as well, it actually uses about 13-14 watts at idle, and 28 when the disks spin up. I can live with that as well, I don't know any PC configuration that would use less than around 100W.
-
This is an older thread, but it did not resolve the problem. I tried to follow the instructions per the wiki and this thread without success till I realized that the problem is that I'm using a Mac. Windows users would not have the same problem as Unix permissions are not in use then.
The fun_plug script downloads on the Mac with owner set to the mac username and only -rw-r--r-- permissions set (non-executable).
Use Mac terminal to set the permission to rwxrwxrwx
chmod 777 /Volumes/Volume_1/fun_plug
and change owner to root
chown root /Volumes/Volume_1/fun_plug
and it worked perfectly on rebooting the NAS
Kevin.
-
That's strange. Every file I've ever put on the NAS via Windows XP/Vista/7 ended up with 777 permissions and owned by the user (and group) I was logged in as. I don't see why that's not the case on a Mac? Don't they both use SMB?
-
The downloaded file has permissions on the Mac of -rw-r--r-- with owner = mac user.
If that file is transferred as-is to the NAS via Finder, its permissions remain -rw-r--r-- with owner = nobody (usergroup 501). Obviously the script won't run as non-executable. Change to executable and now it works just fine.
(Whenever files are copied, Mac OS X uses the following protocol: the POSIX permission bits of the copy are always retained. In other words, if the original file is 0755, then the copy will be 0755; however, the POSIX owner will be changed to the currently connected user).
Kevin
-
That might explain why lots of Mac users are having permission problems with their files stored on the NAS then.
-
It probably is. Without editing the permissions on the Mac before transferring them, the default permissions for files are 0644 (-rw-r--r--) and for directories are 0755 (drwxr-xr-x), and since Leopard they transfer intact, totally ignoring any masks or force create mode statements in /etc/samba/smb.conf.
(See http://discussions.apple.com/thread.jspa?messageID=7349655 for more detail).
/etc/samba.smb.conf
[global]
interfaces = egiga0
unix charset = UTF8
workgroup = workgroups
netbios name = dlink-09391A
server string = DNS-321
hosts allow =
hosts deny =
security = SHARE
encrypt passwords = yes
max log size = 0
socket options = TCP_NODELAY SO_RCVBUF=65536 SO_SNDBUF=65536
max xmit = 65535
create mask = 0777
directory mask = 0777
force create mode = 0777
force directory mode = 0777
use sendfile =yes
disable spoolss = yes
[ web_page ]
comment = Enter Our Web Page Setting
path = /mnt/web_page
valid users =
read only = yes
guest ok = yes
[ Volume_1 ]
comment =
path = /mnt/HD_a2
valid users =
read only = no
guest ok = yes
oplocks = no
map archive = no
[ Volume_2 ]
comment =
path = /mnt/HD_b2
valid users =
read only = no
guest ok = yes
oplocks = no
map archive = no
Windows, on the other hand, properly respects the file and directory masks in the [global] section of /etc/samba/smb.conf on the NAS, which is why all your transfers from Windows to the NAS gain 0777 permissions.
Editing /etc/samba/smb.conf on the NAS to add:
unix extensions = off
to the [global] section, then restarting samba works, but does not survive a reboot. I guess I need to make up a script to run on startup that will stop samba, copy a modifed smb.conf to /etc/samba/ and restart samba.
Kevin.
-
Script to work around permissions problem with Mac after Fun_Plug is installed
Create this and save as /ffp/etc/fun_plug.local
#!/bin/sh
if [ ! -f /mnt/HD_a2/smb.conf.orig ]; then
echo "Backup original /etc/samba/smb.conf"
cp /etc/samba/smb.conf /mnt/HD_a2/smb.conf.orig
fi
if [ -f /mnt/HD_a2/smb.conf ]; then
echo "Copy amended smb.conf to /etc/samba/"
cp /mnt/HD_a2/smb.conf /etc/samba/smb.conf
smb restart
fi
Then give it 0755 permissions
chmod 755 /ffp/etc/fun_plug.local
Run it once. If not using ssh, reboot. If using ssh use
sh /ffp/etc/fun_plug.local
That will copy the /etc/samba/smb.conf to /mnt/HD_a2/smb.conf.orig
If running via ssh it will look like:
root@dlink-09391A:~# sh /ffp/etc/fun_plug.local
Backup original /etc/samba/smb.conf
root@dlink-09391A:~#
Edit it to add the line
unix extensions = off
to the [global] section
[global]
interfaces = egiga0
unix charset = UTF8
workgroup = workgroups
netbios name = dlink-09391A
server string = DNS-321
hosts allow =
hosts deny =
security = SHARE
encrypt passwords = yes
max log size = 0
socket options = TCP_NODELAY SO_RCVBUF=65536 SO_SNDBUF=65536
max xmit = 65535
# <------Added here
unix extensions = off
#
create mask = 0777
directory mask = 0777
force create mode = 0777
force directory mode = 0777
use sendfile =yes
disable spoolss = yes
[ web_page ]
comment = Enter Our Web Page Setting
path = /mnt/web_page
valid users =
read only = yes
guest ok = yes
[ Volume_1 ]
comment =
path = /mnt/HD_a2
valid users =
read only = no
guest ok = yes
oplocks = no
map archive = no
[ Volume_2 ]
comment =
path = /mnt/HD_b2
valid users =
read only = no
guest ok = yes
oplocks = no
map archive = no
and save it as /mnt/HD_a2/smb.conf.
Either re-run the script via ssh or reboot a second time.
If running with ssh it should look like:
root@dlink-09391A:~# sh /ffp/etc/fun_plug.local
Copy amended smb.conf to /etc/samba/
$Shutting down SMB services:
$Shutting down NMB services:
$Starting SMB services:
$Starting NMB services:
root@dlink-09391A:~#
Now Mac files are all saved with 0777 permissions too. Once the amended smb.conf is present and the script is present, it will auto-load the amended smb.conf on every reboot.
-
It probably is. Without editing the permissions on the Mac before transferring them, the default permissions for files are 0644 (-rw-r--r--) and for directories are 0755 (drwxr-xr-x), and since Leopard they transfer intact, totally ignoring any masks or force create mode statements in /etc/samba/smb.conf.
That's very interesting. I didn't realise that at all. I had thought that the NAS itself handled file permissions, regardless of where the files originated from. Certainly may help the guys in the 323 forum too, who have had file access permission issues on certain files, seeminly at random.
Assuming the 323/321 are supposed to be Mac compatible, that's a bug for D-Link?
-
I'm not sure it is, but searching this forum briefly seems to suggest it might have started to be an issue when people upgraded to firmware 1.03 - and if that is really so, yes its a bug!
Just thinking. If fun_plug is NOT installed, I wonder if you re-named the same little script fun_plug with executable permissions set and placed it in the root of the first hard drive, would it patch the DNS the same way too? Guess it depends at which stage in boot the fun_plug hook is at :)
I'm not going to uninstall fun_plug to try it out, but I do have a couple more of these boxes on order (they are currently significantly discounted at TD plus D-Link has a $20 rebate on the 321 ($40 on the 323) per box on up to 2 boxes through 11/30). I might try it on one when it arrives. It can't damage anything, at worst I'd have to delete it from the drive to be back to baseline.
Kevin
-
You don't need the full Fonz Fun Plug (ffp) installed if you just want your script to run. Simply put it in fun_plug with executable permission on the root of Volume_1. This is the file the DNS looks for and what made FFP possible.
-
That's what I thought, but was waiting for an unmodded DNS-321 to arrive to check it! Thanks for saving the time :)
Kevin
-
Without the change to smb.conf, this gets more interesting the more you play.
Mac and Ubuntu Linux behave quite differently.
Copy a file from Ubuntu (10.04 LTS live CD) using Nautilus to NAS -> permissions change to 0777 like Windows
Copy it back to Ubuntu and they return to prior default (ubuntu:ubuntu 0755)
Copy a file from Mac desktop to samba-mounted NAS using Finder -> Mac permissions preserved on NAS
Copy it back and there is no change.
Copy a file from Mac Desktop to samba-mounted NAS by command-line cp (no flags) -> group and others become 0 (0666 or 0644 -> 0600, 0755 -> 0700).
Move a file from Mac Desktop to samba-mounted NAS by command-line mv (no flags) -> permissions change to 0777 and remain so if copied back.
I haven't tried moving to/from a folder with different permissions/umask to see what is happening there, and whether it is inheritance from parent folders that is interfering.
Kevin.
-
So how have you been transferring the files from the Mac to cause the issue?
-
Using Finder (i.e. by GUI drag-drop).
It has not been problematic if you are only using it to store data for use purely with the Mac. The problem comes with how the inherited permissions from the Mac interfere with access and execution on devices using another OS - including the NAS itself.
If permissions are all converted to 0777 for data and programs stored on the NAS Volumes, as they obviously intended to do based on the smb.conf in the NAS firmware, that should reduce many of the problems across operating systems. However, it does mean being very careful if using FFP. If transfers come via Samba from Windows or Linux (or Mac, if smb.conf is modified by the script above), all files become executable - even data. Of course, that is not a problem if the device is used just for storage as intended.
-
And one more observation.
Transferring (copying) files via FTP (using FireFTP, logged into the NAS FTP as superuser) from the Mac to the NAS converts them all to 0777 permissions on the NAS! Pulling them back gives them 0644 permissions regardless of original permissions.
Kevin.
-
Just out of interest, are you running the latest firmware version on your NAS, and did you do a factory reset after upgrading? Wondering if it would change the behaviour.
-
1.03 on the DNS-321 - latest I can find, and yes - it either came installed, or I installed it soon after arrival before configuring the box and disks ( I can't honestly remember which, but I know that I've never upgraded firmware with the data present on it).
-
if you're still having problems the solution is easy
first - what system are you on, windows or macosx?
either way - make absolutely sure the fun_plug file has NO extension - on macosx it auto-adds .sh as an extension if you are unsure either way - simply open the file in a plain text editor and copy its contents into a plain file and save it as fun_plug - with no extension, also remove any whitespace at the bottom!
i'd also recommend placing a copy of fun_plug and the fun_plug.tgz files in BOTH your volumes - because it depends on which drive is your *real* volume_1 (the dns-321 names whichever drive - regardless of left or right, volume_1 as the first drive inserted)
finally - reboot, and wait about 5 minutes - as the dns-321 is slow to deflate the .tgz
check both volumes for an ffp folder and ffp.log
please post your results
p.s. sorry if this was answered already as i didn't want to read through 5 pages of forum on here :)
good luck!
-
Thanks but not helpful.
The question is already answered, and this method won't work from Mac OSX Snow Leo if files are transferred via Finder by drag/drop for the reasons described above. Snow does not automatically apply a .sh extension, by the way.
You need to change permissions in the file before or after transfer to the NAS since it is not flagged executable on the Mac and that is preserved on transfer. The NAS, being a Linux machine respects those permissions and says "no way" till you change to executable!
Alternatively, transfer it using FTP, permissions will be set to 0777 (read/write/executable by all) automatically, just like they are if transferred from Windows or Linux - it's all there in last two pages of the thread ;D
-
on my snow leopard it auto-added .sh as unix-exectuable file - simply removing the .sh extension does not work on mac - you have to hit get-info on the file, and you'll see that in fact it has added the extension anyway - and on the get-info of the file, uncheck the .sh extension, i think it said "show extension"
but like i said in previous post if this was answered already :) as i didn't want to read through 5 pages hehe
just simply posting what i had to do to get it to work - from download file, and dragging to dns-321 - didn't work that way - and i finally got it to work with the steps i posted :)