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

#1276 2010-09-04 04:41:13

overthinkingme
New member
Registered: 2010-09-04
Posts: 4

Re: [REL] Transmission 1.3

I have a problem that I need help with, after following the install instructions, I tried to access the web ui but I received

403: Forbidden

Unauthorized IP Address.

Either disable the IP address whitelist or add your address to it.

If you're editing settings.json, see the 'rpc-whitelist' and 'rpc-whitelist-enabled' entries.

If you're still using ACLs, use a whitelist instead. See the transmission-daemon manpage for details.

any advice please?
I disabled auth in the transmission remote but still not acess

Offline

 

#1277 2010-09-04 12:11:12

fab
Member
Registered: 2010-09-04
Posts: 10

Re: [REL] Transmission 1.3

Ok I am confused with the default download directory setup, I get the same permission denied error mentioned in the last few pages.

Tutorial mention
chown -R nobody /mnt/HD_a2/Downloads

But in transmission default is
/home/nobody/Downloads

Is it the same location?

Also I thought transmission would create automatically the directory specified in preferences but the log is showing it's not able to.

Offline

 

#1278 2010-09-04 13:15:10

FunFiler
Member
Registered: 2010-05-23
Posts: 577

Re: [REL] Transmission 1.3

overthinkingme wrote:

any advice please?
I disabled auth in the transmission remote but still not acess

Try adding your IP range to the white list anyway:
The whitelist is a comma-separated list of IP addresses.  Wildcards can be specified in an address by using '*'.  The default is "127.0.0.1" (local access only)
Example: "127.0.0.*,192.168.1.*"

Are you sure you are editing the settings.json file while transmission is shut down?


3 * (DNS-323 with 2 * 2TB) = 12TB Running FW v1.08 & FFP v0.5
Useful Links: Transmission, Transmission Remote, Automatic

Offline

 

#1279 2010-09-04 13:17:21

FunFiler
Member
Registered: 2010-05-23
Posts: 577

Re: [REL] Transmission 1.3

fab wrote:

Ok I am confused with the default download directory setup, I get the same permission denied error mentioned in the last few pages.

Also I thought transmission would create automatically the directory specified in preferences but the log is showing it's not able to.

I'm pretty sure Transmission created the directories for me and I didn't have to mess with permissions, but I guess it depends on your setup, permissions, the user you are logged in as and where you are trying to install it.

Did you try creating the directory manually and setting the permissions?

Last edited by FunFiler (2010-09-04 13:17:51)


3 * (DNS-323 with 2 * 2TB) = 12TB Running FW v1.08 & FFP v0.5
Useful Links: Transmission, Transmission Remote, Automatic

Offline

 

#1280 2010-09-04 17:52:25

overthinkingme
New member
Registered: 2010-09-04
Posts: 4

Re: [REL] Transmission 1.3

FunFiler wrote:

overthinkingme wrote:

any advice please?
I disabled auth in the transmission remote but still not acess

Try adding your IP range to the white list anyway:
The whitelist is a comma-separated list of IP addresses.  Wildcards can be specified in an address by using '*'.  The default is "127.0.0.1" (local access only)
Example: "127.0.0.*,192.168.1.*"

Are you sure you are editing the settings.json file while transmission is shut down?

Thank you for your response, I appreciate it.
I entered the command in the first page:

su nobody -c "transmission-daemon -f -g /mnt/HD_a2/.transmission-daemon -t -u <username> -v <password> -a 127.0.0.1,192.168.*.*"

I believe that added my ip range, which is 192.168.3.*, to the list. I also added the computer's exact internal ip address, 192.168.3.2. But still no success.

I can't edit the settings.json file because, even if Transmission is off, I get a access denied error. I tried opening it through explorer and notepad++. Is that normal?
I figured out that I can use the vi command to edit it.

Got it to work, thanks!

Last edited by overthinkingme (2010-09-04 18:07:10)

Offline

 

#1281 2010-09-04 18:52:57

KyleK
Member
From: Dresden, Germany
Registered: 2007-12-05
Posts: 1178

Re: [REL] Transmission 1.3

fab wrote:

Ok I am confused with the default download directory setup, I get the same permission denied error mentioned in the last few pages.

Tutorial mention
chown -R nobody /mnt/HD_a2/Downloads

But in transmission default is
/home/nobody/Downloads

Is it the same location?

Also I thought transmission would create automatically the directory specified in preferences but the log is showing it's not able to.

All the issues with permissions and user rights comes down to the fact that in Linux, some users can "do" more than others.

I really don't want to write a comprehensive "Guide to Linux user rights", there are other sites that do it way better than me, so here are the basics.

Let's use an example: We have a folder called "MyFolder" which is owned by the user "foo" and the usergroup "bar".
The folder rights are 0750 (or rwxr-x---).
The rights mean that the user ("foo")  has full rights. (read, write, execute), the group bar can read and execute, but not write, and everyone else can't do anything (not even look inside  the folder).

Now the user 'root' is a special case. It can do basically everything. It can look inside above folder, read the content of its files, and create new files as well. It's the ultimate account.

Now when you log onto the NAS via Telnet, by default everything you do is done as user 'root'.

When you start Transmission from the commandline, like so:

Code:

$ transmission-daemon -f -g /mnt/HD_a2/.transmission-daemon ...

It will run as root. And all the files and folder Transmission creates automatically will belong to the user root.

Here's the catch: Only the user 'root' can access files and folders owned by 'root'. Noone else can.
So when you first start Transmission like above, and later on decide Transmission can run as a different user, you will get your "Permission denied" errors.

The startup script for Transmission by default starts the app as user "nobody", which is kind of a special case itself. It has very low rights, but people here prefer it because you can delete files and folders from within Windows when they are owned by the user "nobody".
(I don't know why that is, and personally don't run as "nobody", but that's just personal preference).

So the big no-no here is to never run Transmission as different users. Either always run as root, or always run as "nobody". (Or any other user you want).

Running as root is "potentially dangerous", because if someone ever finds some exploit in Transmission, it may provide them with root access to the rest of the machine. So far nothing like that ever happened, but you never know.

Running as "nobody" is only necessary if different people with different logins access the NAS, and all those people delete/move files and folders that Transmission created.
If only one person is allowed to do that task (like in my case), run Transmission as that user, and all should be fine.



I hope this helps some, and if anyone ever finds out how to permalink to posts, let me know and I'll add a link to the first post :)

Offline

 

#1282 2010-09-04 19:16:15

fab
Member
Registered: 2010-09-04
Posts: 10

Re: [REL] Transmission 1.3

Thanks for the replies

I am still not sure what am I doing wrong

I did use

su nobody -c "transmission-daemon -f -g /mnt/HD_a2/.transmission-daemon -t -u nobody -v password -a 127.0.0.1,192.168.1.100"

And did

$ chown -R nobody /mnt/HD_a2/.transmission-daemon
$ chown -R nobody /home/nobody/Downloads

Now the first download start but stop after downloading 4MB telling me there is not enough space...

Last edited by fab (2010-09-04 19:19:25)

Offline

 

#1283 2010-09-04 19:31:46

KyleK
Member
From: Dresden, Germany
Registered: 2007-12-05
Posts: 1178

Re: [REL] Transmission 1.3

You didn't tell Transmission where to download files to. Transmission uses your home folder as download folder by default, and the default home folder is /home/root, which sits on the internal flash of the NAS and is anything but large smile

Remove all torrents, then quit Transmission, then do this:

Code:

$ su nobody -c "transmission-daemon -f -g /mnt/HD_a2/.transmission-daemon -w /mnt/HD_a2/Downloads"
(Transmission starts, wait a while, then press Ctrl-C, like described in the first post)
$ /ffp/start/transmission.sh start

This should do the trick.

Offline

 

#1284 2010-09-04 19:43:34

fab
Member
Registered: 2010-09-04
Posts: 10

Re: [REL] Transmission 1.3

Yup that did the trick, thanks a million!

Probably want to add this to your first post, I think the last couple of guys who ran in the permission denied error message were missing that step as well.

Again thank you for your help and patience, much appreciated.

Offline

 

#1285 2010-09-04 21:45:57

fab
Member
Registered: 2010-09-04
Posts: 10

Re: [REL] Transmission 1.3

How do you set the Seed ratio limit? I can't seem to find that option in the Web UI

/Edit

Nevermind found the option in the json

Need to figure out how the blocklist works now

Last edited by fab (2010-09-04 22:04:32)

Offline

 

#1286 2010-09-05 00:50:25

KyleK
Member
From: Dresden, Germany
Registered: 2007-12-05
Posts: 1178

Re: [REL] Transmission 1.3

I suggest you take a look at 'transmission-remote'. It can be used to set most options while Transmission is running.

Offline

 

#1287 2010-09-05 22:13:58

maxim_fr
Member
From: Kyiv, Ukraine
Registered: 2007-11-07
Posts: 20

Re: [REL] Transmission 1.3

A bit of offtopic, but... uTorrent for Linux alpha is out. But, it requires 2.6.13+ kernel sad

it has no GUI, but a webUI instead...

How do you think, what's our chances to get uT working on DNSes ?

Offline

 

#1288 2010-09-05 23:30:53

KyleK
Member
From: Dresden, Germany
Registered: 2007-12-05
Posts: 1178

Re: [REL] Transmission 1.3

Unless the uTorrent guys provide source code (unlikely), or an ARM binary that is specifically compiled for the DNS (even more unlikely), I'd say never smile

Offline

 

#1289 2010-09-06 00:48:22

jcisio
New member
From: France
Registered: 2010-08-14
Posts: 4
Website

Re: [REL] Transmission 1.3

KyleK wrote:

jcisio wrote:

After more observation, I conclude the slow hash check is due to disk io (I was copying over samba hundreds of GB of data). However I don't understand why, because hash check, at 30 GB/h or 8 MB/s is related to CPU rather than to HDD I/O.

The NAS doesn't have support for DMA, so any IO access goes through the CPU. Copying data via Samba (which is rather CPU-hungry itself) will thus slow down any other operations on the NAS.

(Besides, if Samba writes files to one part of the disk, and Transmission reads data on another part of the disk (to caculate the piece hashes), the drive's head is moving like crazy to do its work. That'll slow down everything considerably)

It makes sense to me. I didn't think about the DMA.

KyleK wrote:

Hey guys,

sorry for being unavailable recently. I've relocated to another apartment and was without internet access for a month.
But now I'm back and will try to answer an open questions that have piled up since July.

Cheers!

That's great. Thanks for your continuous support.

Offline

 

#1290 2010-09-07 17:39:35

sirmax
Member
Registered: 2010-01-26
Posts: 31

Re: [REL] Transmission 1.3

KyleK wrote:

Code:

$ ./configure --prefix=/ffp --disable-cli --disable-gtk --disable-nls --without-inotify
$ make

It is possible to make inotify working:
1. Install my package https://sites.google.com/site/sirmaxwik … -0.1-1.tgz
2. Apply patch to transmission sources:

Code:

--- configure.orig    2010-06-27 05:31:52 +0300
+++ configure    2010-07-17 12:55:50 +0300
@@ -16911,7 +16911,8 @@
 
 ac_fn_c_check_header_mongrel "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default"
 if test "x$ac_cv_header_sys_inotify_h" = x""yes; then :
-  ac_fn_c_check_func "$LINENO" "inotify_init" "ac_cv_func_inotify_init"
+#  ac_fn_c_check_func "$LINENO" "inotify_init" "ac_cv_func_inotify_init"
+  ac_cv_func_inotify_init="yes"
 if test "x$ac_cv_func_inotify_init" = x""yes; then :
   have_inotify="yes"
 else

3. Configure with inotify:

Code:

./configure --prefix=/ffp --disable-cli --disable-gtk --disable-nls --with-inotify

4. build / package / install...
5. enable watch-dir in settings.json

Code:

    "watch-dir": "/mnt/HD_a2/ftp/torrents",
    "watch-dir-enabled": true

6. start

Last edited by sirmax (2010-09-07 17:48:01)

Offline

 

#1291 2010-09-07 19:29:49

KyleK
Member
From: Dresden, Germany
Registered: 2007-12-05
Posts: 1178

Re: [REL] Transmission 1.3

Well, yes, it is possible, but people have reported crashes when inotify was enabled, so I currently switch it off to be on the safe side. Are you running Transmission with inotify and no crashes?

Offline

 

#1292 2010-09-08 01:30:59

TiVa
Member
Registered: 2010-09-08
Posts: 5

Re: [REL] Transmission 1.3

i just bought the ch3hnas, any idea transmission will work on that? it has funplug support but version 1.0, can't find any information on it...
besides, the download links are dead? Can someone put them back up?

Offline

 

#1293 2010-09-08 01:36:41

FunFiler
Member
Registered: 2010-05-23
Posts: 577

Re: [REL] Transmission 1.3

TiVa wrote:

besides, the download links are dead? Can someone put them back up?

If you are referring to the Transmission download link, in the first post, it is working for me. There is an alternative link a few pages back for v2.03.


3 * (DNS-323 with 2 * 2TB) = 12TB Running FW v1.08 & FFP v0.5
Useful Links: Transmission, Transmission Remote, Automatic

Offline

 

#1294 2010-09-08 10:04:10

sirmax
Member
Registered: 2010-01-26
Posts: 31

Re: [REL] Transmission 1.3

KyleK wrote:

Well, yes, it is possible, but people have reported crashes when inotify was enabled, so I currently switch it off to be on the safe side. Are you running Transmission with inotify and no crashes?

Currently I use own build of latest transmission with inotify. I has no crashes for about 2 weeks.
I has crashes running mediatomb with inotify, but after researching, it seems the problem was in the open files limit for user nobody. After adding command "ulimit -n 65536" into /ffp/etc/fun_plug.local all starting and running without problems.

You can try my package: http://sites.google.com/site/sirmaxwiki … 2.04-2.tgz
The only depend is curl.

You are right about safety. Inotify behavior is strange on DNS-323, because it is the one of first beta inotify code in the kernel. But it is easy to disable inotify in the config, setting watch-dir-enabled to false

Last edited by sirmax (2010-09-08 10:23:43)

Offline

 

#1295 2010-09-08 10:57:55

TiVa
Member
Registered: 2010-09-08
Posts: 5

Re: [REL] Transmission 1.3

FunFiler wrote:

TiVa wrote:

besides, the download links are dead? Can someone put them back up?

If you are referring to the Transmission download link, in the first post, it is working for me. There is an alternative link a few pages back for v2.03.

thanks man! the links in the first posts still don't work, but the 2.03 files will do!

i installed funplug 1.0 (for ch3hnas, provided by conceptronic itself) but can't install all the packages included in 0.5, are they necessary for transmission to work? or is the installation of the funplug itself en curl enough?

Last edited by TiVa (2010-09-08 11:21:27)

Offline

 

#1296 2010-09-08 18:05:19

ABCC
Member
Registered: 2010-04-13
Posts: 10

Re: [REL] Transmission 1.3

Has anyone managed to get the new "script-torrent-done-filename" feature configured so that it can call transmission-remote?

I've held off upgrading to the 2.0.x series until now as I've had this working well from ~ 1.7 with the "external-done-command" setting. If I'm not mistaken it was KyleK's inclusion of a patch from https://trac.transmissionbt.com/ticket/1796 that made it possible.

Since the upgrade to 2.0.4 however things have regressed. For testing purposed I've whipped up a simple script that merely calls transmission-remote -l and then pipes both the output and exit value to a logfile. Previously this would've given a list of all the torrents, currently all I find in my logfile is the error code: 127. Any ideas?

ABCC

Offline

 

#1297 2010-09-09 00:41:27

AdamBrunt
Member
Registered: 2008-05-23
Posts: 21

Re: [REL] Transmission 1.3

Thanks KyleK for a great app.

Only just realised (after owning a 323 for ages) that it could do this - and following your installation instructions made it easy.

It's is certainly going to be more power saving, getting the DNS to download a torrent rather then keep the PC on just to do it smile

Offline

 

#1298 2010-09-09 00:47:46

KyleK
Member
From: Dresden, Germany
Registered: 2007-12-05
Posts: 1178

Re: [REL] Transmission 1.3

ABCC wrote:

Has anyone managed to get the new "script-torrent-done-filename" feature configured so that it can call transmission-remote?

I've held off upgrading to the 2.0.x series until now as I've had this working well from ~ 1.7 with the "external-done-command" setting. If I'm not mistaken it was KyleK's inclusion of a patch from https://trac.transmissionbt.com/ticket/1796 that made it possible.

Since the upgrade to 2.0.4 however things have regressed. For testing purposed I've whipped up a simple script that merely calls transmission-remote -l and then pipes both the output and exit value to a logfile. Previously this would've given a list of all the torrents, currently all I find in my logfile is the error code: 127. Any ideas?

ABCC

Error code 127 means "Command not found". Either Transmission was unable to find the script it should execute, or an executable that is referenced in the script has the wrong path.

Offline

 

#1299 2010-09-09 12:31:06

TiVa
Member
Registered: 2010-09-08
Posts: 5

Re: [REL] Transmission 1.3

TiVa wrote:

i installed funplug 1.0 (for ch3hnas, provided by conceptronic itself) but can't install all the packages included in 0.5, are they necessary for transmission to work? or is the installation of the funplug itself en curl enough?

damn, can't install tranmission on my ch3hnas with funplug 1.0. the su nobody isn't recognised,
so i can't set the username or password and i'm kinda a noob in linux.
is there a way around this problem?

Offline

 

#1300 2010-09-09 14:46:30

KyleK
Member
From: Dresden, Germany
Registered: 2007-12-05
Posts: 1178

Re: [REL] Transmission 1.3

AFAIK there's no funplug 1.0. Are you sure you aren't just referring to the normal NAS firmware?

Can you post a link to where you got that funplug?

EDIT: Found it. This looks like a modified version of funplug, specifically for the CH3HNAS.

What happens when you issue the command "su nobody -c ..."?
Type 'cat /etc/passwd' to make sure the user nobody exists. Otherwise you have to create a new user.

Last edited by KyleK (2010-09-09 14:51:40)

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB