Download Station v2 Configuration
-
- Starting out
- Posts: 12
- Joined: Fri Jul 30, 2010 8:00 am
Download Station v2 Configuration
I recently upgraded to F/W 3.4.0 Build 0212T and started using Download Station v2 for torrents. I have a couple of questions regarding the target folder for downloads:
1) When configuring the "Default directory for downloaded files", I can only choose top-level directories from a drop-down list. I would like to choose a sub-directory for this.
2) Even though my default directory for downloaded files is currently set to "Public", and the folder permissions are set to read-write (even for Guest access), downloaded folders are created with 755 permissions. I would like to set this to 777.
Given that the "Settings" page does not make these settings possible, is there a configuration file I can edit manually to achieve the settings I'm looking for?
Thanks.
1) When configuring the "Default directory for downloaded files", I can only choose top-level directories from a drop-down list. I would like to choose a sub-directory for this.
2) Even though my default directory for downloaded files is currently set to "Public", and the folder permissions are set to read-write (even for Guest access), downloaded folders are created with 755 permissions. I would like to set this to 777.
Given that the "Settings" page does not make these settings possible, is there a configuration file I can edit manually to achieve the settings I'm looking for?
Thanks.
-
- New here
- Posts: 2
- Joined: Tue Jan 25, 2011 8:20 pm
Re: Download Station v2 Configuration
I solved the top-level directory problem by adding the folder to the list manually - ssh in and:
Now go down to the ShowSetting line and insert a line so the code looks like this:
Replacing Public/Share/Download with an existing directory on a share (Public is the name of the share in this example).
Now hit escape, :wq and you're done. All at your own risk but it seems to work fine for me.
I'm struggling with the permissions problem as well.
Code: Select all
cd /mnt/ext/home/httpd/cgi-bin/Qdownload/lib/
vi ds_action.js
/sharelist_ds.reload
i
Code: Select all
DS.CFG_sharelist_ds.reload({
callback: function(records){
for(var i=0; i< records.length; i++){
DS.CFG_sharelist_Ary[i] = DS.CFG_sharelist_ds.getAt(i).get('Name');
}
DS.CFG_sharelist_Ary[i] = 'Public/Torrent/Download';
ShowSetting();
}
});
Now hit escape, :wq and you're done. All at your own risk but it seems to work fine for me.
I'm struggling with the permissions problem as well.
-
- Starting out
- Posts: 12
- Joined: Fri Jul 30, 2010 8:00 am
Re: Download Station v2 Configuration
Thanks for the tip for adding sub-folders to the list!
As for the permissions on files and directories, I'm able to get the behaviour I want manually by executing the following commands:
umask 0000
/etc/init.d/btd.sh restart
Folders are then created as drwxrwxrwx (0777), and files as -rw-rw-rw- (0666).
I would like to make this permanent across reboots, but I'm finding out that many configuration files are overwritten at startup. It looks like I may need to create an autorun.sh script as described in http://wiki.qnap.com/wiki/Running_Your_ ... at_Startup
I'm not clear on where in the startup sequence autorun.sh would be run, in comparison to files in /etc/rcS.d for example.
As for the permissions on files and directories, I'm able to get the behaviour I want manually by executing the following commands:
umask 0000
/etc/init.d/btd.sh restart
Folders are then created as drwxrwxrwx (0777), and files as -rw-rw-rw- (0666).
I would like to make this permanent across reboots, but I'm finding out that many configuration files are overwritten at startup. It looks like I may need to create an autorun.sh script as described in http://wiki.qnap.com/wiki/Running_Your_ ... at_Startup
I'm not clear on where in the startup sequence autorun.sh would be run, in comparison to files in /etc/rcS.d for example.
-
- First post
- Posts: 1
- Joined: Sat May 28, 2011 10:03 am
Re: Download Station v2 Configuration
Where are the configuration files located on the QNAP TS-509?
I just updated the firmware to 3.4 and looking at the settings on the Download Station, all I see are all top level directories.
I just updated the firmware to 3.4 and looking at the settings on the Download Station, all I see are all top level directories.
-
- New here
- Posts: 8
- Joined: Mon Apr 11, 2011 9:51 am
Re: Download Station v2 Configuration
Looks like /home/httpd/cgi-bin/Qdownload/lib
-
- New here
- Posts: 8
- Joined: Mon Apr 11, 2011 9:51 am
Re: Download Station v2 Configuration
The specified code will only work for one directory addition. If you try to add multiple directories only last one added wins. To add multiple directories to the list use the following instead:
Replace <directory-#> with the directory you want to see listed. You can add as many as you wish, they will appear at the bottom of the selection list in the order you entered them in. Just be sure they are all added before the ShowSetting(); line.
Thanks for finding this!
Code: Select all
DS.CFG_sharelist_Ary[i++] = '<directory-1>';
DS.CFG_sharelist_Ary[i++] = '<directory-2>';
DS.CFG_sharelist_Ary[i++] = '<directory-n>';
ShowSetting();
Thanks for finding this!
-
- New here
- Posts: 5
- Joined: Sat Jun 16, 2012 4:18 pm
Re: Download Station v2 Configuration
I'm running firmware 3.8.2 and things have changed a little bit.
The code is now in ds_tool.js
Search for these lines:
and add this line of code (you can add it multiple times for more share names)
Thanks to ashre and covvie for giving me the right directions!
The code is now in ds_tool.js
Search for these lines:
Code: Select all
for(var g=0;g<jo.shareName.length;g++){
DS.CFG_sharelist_Ary[g] = [jo.shareName[g],jo.shareName[g]];
}
Code: Select all
DS.CFG_sharefolder_Ary[g++] = ['directory/subdirectory','directory/subdirectory'];
-
- New here
- Posts: 2
- Joined: Mon Apr 01, 2013 2:11 am
Re: Download Station v2 Configuration
Hi CasperBE,
I tried to change the code you mentioed but nothing really happened. I am wondering if I have to restart something other then reload the page.
I also tried to change the code in a different way like this:
Also interested in if there is any way to debug what I made?
Could you please help me with advice?
Thanks in advance!
I tried to change the code you mentioed but nothing really happened. I am wondering if I have to restart something other then reload the page.
I also tried to change the code in a different way like this:
Code: Select all
success: function(o){
var jo =Ext.util.JSON.decode(o.responseText);
if(jo.result==DS.status.jsonSuccess){
// for(var g=0;g<jo.shareName.length;g++){
// DS.CFG_sharelist_Ary[g] = [jo.shareName[g],jo.shareName[g]];
// }
DS.CFG_sharelist_Ary[0] = ['Download/Vera','Download/Vera'];
DS.CFG_sharelist_Ary[1] = ['Download','Download'];
DS.CFG_sharelist_Ary[2] = ['Media','Media'];
DS.CFG_sharelist_Ary[3] = ['home','home'];
DS.dym.defDLFolder = jo.mvFolder;
}
Could you please help me with advice?
Thanks in advance!
-
- New here
- Posts: 4
- Joined: Sat Mar 08, 2014 12:32 am
Re: Download Station v2 Configuration
Hi dulo,
I don't know if you still need it, but this way works for me on a Qnap TS-269pro with firmware 4.1.0:
In /home/httpd/cgi-bin/Qdownload/libs/ds-setup.js add another data.push():
In your case the following should work:
Kind regards,
Christian
I don't know if you still need it, but this way works for me on a Qnap TS-269pro with firmware 4.1.0:
In /home/httpd/cgi-bin/Qdownload/libs/ds-setup.js add another data.push():
Code: Select all
DS.RPC.Misc.getFolderList(function (err, o) {
var data = [];
for (var i = 0, len = o.shareName.length ; i < len ; ++i) {
data.push([o.shareName[i]]);
}
data.push(["directory/subdirectory"]);
shareStore.loadData(data);
});
Code: Select all
DS.RPC.Misc.getFolderList(function (err, o) {
var data = [];
// for (var i = 0, len = o.shareName.length ; i < len ; ++i) {
// data.push([o.shareName[i]]);
// }
data.push(["Download/Vera"]);
data.push(["Download"]);
data.push(["Media"]);
data.push(["home"]);
shareStore.loadData(data);
});
Christian
-
- New here
- Posts: 5
- Joined: Fri Jan 23, 2015 1:37 am
Re: Download Station v2 Configuration
Hi Christian!
I made Download/torrentz directory from admin account, all permissions are correct. I edited my /home/httpd/cgi-bin/Qdownload/libs/ds-setup.js like that :
But. After i save the file ( i double checked, all my changes was still there after closing the file), and reboot the NAS, nothing is changed. File is going back to default, and all settings are still the same. Without Download/torrentz section.
What am I doing wrong? Please help me mate
Regards!
I made Download/torrentz directory from admin account, all permissions are correct. I edited my /home/httpd/cgi-bin/Qdownload/libs/ds-setup.js like that :
Code: Select all
DS.RPC.Misc.getFolderList(function (err, o) {
var data = [];
// for (var i = 0, len = o.shareName.length ; i < len ; ++i) {
// data.push([o.shareName[i]]);
// }
data.push(["Download/torrentz"]);
data.push(["Download"]);
shareStore.loadData(data);
});
What am I doing wrong? Please help me mate
Regards!
-
- New here
- Posts: 5
- Joined: Fri Jan 23, 2015 1:37 am
Re: Download Station v2 Configuration
Or maybe there is another way to solve this problem?
I would like to switch Download directory from global (Download,Multimedia,WEb.etc...) to subdirectory like Download/somethinghere.
QNAP TS-212, Download Station 4.0.5
Thanks!
I would like to switch Download directory from global (Download,Multimedia,WEb.etc...) to subdirectory like Download/somethinghere.
QNAP TS-212, Download Station 4.0.5
Thanks!
-
- New here
- Posts: 4
- Joined: Sat Mar 08, 2014 12:32 am
Re: Download Station v2 Configuration
I'm sorry I can't remember doing anything special besides the stuff I described in my post. However, a reboot might not be necessary, disabling and re-enabling the Download Station in App Center might be enough.
If it doesn't work, you could ask sbrez81 http://forum.qnap.com/viewtopic.php?f=1 ... 14#p456467. He recently had the same problem. Maybe he remembers what he did...
If it doesn't work, you could ask sbrez81 http://forum.qnap.com/viewtopic.php?f=1 ... 14#p456467. He recently had the same problem. Maybe he remembers what he did...