Page 1 of 1

[DONE][feature request] support noexec at temp dir in linux

Posted: Fri Jun 10, 2011 6:22 pm
by qux
Hi,

As far as I understand, currently Flashgot doesn't support temp directory mounted with noexec option in *nix. Is it possible to provide such support?
The easiest way is to launch "$shellname $scriptpath" instead of just "$scriptpath", I think. For example:

Code: Select all

/bin/sh /tmp/flashgot.profile/flashgot-1.fgt
Shell name will be same which is written in "#!" script directive.

Re: [feature request] support noexec at temp dir in linux

Posted: Sat Jun 11, 2011 2:11 pm
by Giorgio Maone
Please check latest development build.

BTW, have you got any idea about ways to automate this to some extent?

Re: [feature request] support noexec at temp dir in linux

Posted: Sat Jun 11, 2011 7:43 pm
by qux
Link from that page gives 404: https://secure.informaction.com/downloa ... 0.2rc3.xpi

Regarding audit error: I'm not familiar with AppArmor and such policy creation, but it seems like "owner" is a AppArmor tool which modifies its policy and should be launched with root privileges. In this case it is impossible to solve this issue without either user action or package maintainer help, I think.
If it is refused to include rules for flashgot to firefox policy, the mentioned xul-ext-flashgot package may be a right way to install them.

Re: [feature request] support noexec at temp dir in linux

Posted: Sat Jun 11, 2011 7:56 pm
by Giorgio Maone
qux wrote:Link from that page gives 404: https://secure.informaction.com/downloa ... 0.2rc3.xpi
Please retry now.

Re: [feature request] support noexec at temp dir in linux

Posted: Sat Jun 11, 2011 8:42 pm
by qux
Installed. Sorry, now it opens xterm window with such error:

Code: Select all

xterm: Can't execvp /tmp/flashgot.profile0/flashgot-1.fgt: Permission denied
Same error is produced by launch "/bin/sh /tmp/flashgot.profile0/flashgot-1.fgt" from the command line, but after passing some parameter to script all works fine (in command line). For example:

Code: Select all

$ /bin/sh /tmp/flashgot.profile0/flashgot-1.fgt foo
URL 1/1...
[#1 SIZE:944.0KiB/15.8MiB(5%) CN:1 SPD:177.7KiBs ETA:01m26s]
I don't know the purpose of "term" parameter in such line:

Code: Select all

xterm -T FlashGot\ http://download.oracle.com/otn-pub/java/jdk/6u26-b03/jre-6u26-windows-i586.exe -e "$0" term && exit
but if it should be passed to script as first parameter ($1), this line should be some different:

Code: Select all

xterm -T FlashGot\ http://download.oracle.com/otn-pub/java/jdk/6u26-b03/jre-6u26-windows-i586.exe -e "$0 term" && exit
Also, it works for me only after adding shell path to script name:

Code: Select all

xterm -T FlashGot\ http://download.oracle.com/otn-pub/java/jdk/6u26-b03/jre-6u26-windows-i586.exe -e "/bin/sh $0 term" && exit

Re: [feature request] support noexec at temp dir in linux

Posted: Sat Jun 11, 2011 9:08 pm
by Giorgio Maone
Please retry with rc4, thanks.

Re: [feature request] support noexec at temp dir in linux

Posted: Sun Jun 12, 2011 7:21 am
by qux
Now flashgot-*.fgt file isn't created while downloading something. Just flashgot.fgt and flashgot.sh.test are present.
Flashgot log:

Code: Select all

*** FlashGot 1.3.0.2rc4 started at Sun, 12 Jun 2011 07:15:27 GMT ***
Per-session init started
Per-session init done in 6ms
Running /bin/sh /tmp/flashgot.profile0/flashgot.fgt -- blocking
Native execution time 73
Aria|KO
Downloader 4 X (nt)|KO
Downloader 4 X|KO
GNOME Gwget|KO
/usr/bin/kget
KDE KGet|OK
wxDownload Fast|KO
Axel|KO
/usr/bin/curl
cURL|OK
FatRat|KO
Prozilla|KO
/usr/bin/wget
Wget|OK
Uget|KO
/usr/bin/aria2c
Aria 2|OK
Steadyflow|KO

Warning: download manager wxDownload Fast not found
Warning: download manager Uget not found
Warning: download manager TrueDownloader not found
Warning: download manager Thunder (Old) not found
Warning: download manager Thunder not found
Warning: download manager Steadyflow not found
Warning: download manager Star Downloader not found
Warning: download manager Speed Download Lite not found
Warning: download manager Speed Download not found
Warning: download manager ReGet not found
Warning: download manager Prozilla not found
Warning: download manager Orbit not found
Warning: download manager NetAnts not found
Warning: download manager Net Transport 2 not found
Warning: download manager Net Transport not found
Warning: download manager Mass Downloader not found
Warning: download manager LeechGet 2002 not found
Warning: download manager LeechGet not found
Warning: download manager Leech not found
Warning: download manager JDownloader not found
Warning: download manager Internet Download Manager not found
Warning: download manager Internet Download Accelerator not found
Warning: download manager InstantGet not found
Warning: download manager iGetter Win not found
Warning: download manager iGetter not found
Warning: download manager HiDownload not found
Warning: download manager GNOME Gwget not found
Warning: download manager GigaGet not found
Warning: download manager GetRight not found
Warning: download manager FreshDownload not found
Warning: download manager Free Download Manager not found
Warning: download manager Folx not found
Warning: download manager FlashGet 2.x not found
Warning: download manager FlashGet 2 not found
Warning: download manager FlashGet not found
Warning: download manager FatRat not found
Warning: download manager DTA (Turbo) not found
Warning: download manager DTA not found
Warning: download manager Downloader 4 X (nt) not found
Warning: download manager Downloader 4 X not found
Warning: download manager Download Master not found
Warning: download manager Download Accelerator Plus not found
Warning: download manager BitComet not found
Warning: download manager Axel not found
Warning: download manager Aria not found
Download managers detection done in 93ms
JDownloader response:
0

Preprocessing done in ms41
Starting dispatch
ReferenceError: shellExec is not defined
([object Array],0)@chrome://flashgot/content/DMS.js:728
([object Array],0)@chrome://flashgot/content/DMS.js:329
([object Array],0)@chrome://flashgot/content/DMS.js:319
()@jar:file:///home/qux/.mozilla/firefox/profile0/extensions/%7B19503e42-ca3c-4c27-b1e2-9cdb2170ee34%7D.xpi!/components/flashgotService.js:627
([object XPCWrappedNative_NoHelper])@jar:file:///home/qux/.mozilla/firefox/profile0/extensions/%7B19503e42-ca3c-4c27-b1e2-9cdb2170ee34%7D.xpi!/components/flashgotService.js:739

Dispatch done in ms1868
Total processing time: ms1910
Preprocessing done in ms31
Starting dispatch
ReferenceError: shellExec is not defined
([object Array],0)@chrome://flashgot/content/DMS.js:728
([object Array],0)@chrome://flashgot/content/DMS.js:329
([object Array],0)@chrome://flashgot/content/DMS.js:319
()@jar:file:///home/qux/.mozilla/firefox/profile0/extensions/%7B19503e42-ca3c-4c27-b1e2-9cdb2170ee34%7D.xpi!/components/flashgotService.js:627
([object XPCWrappedNative_NoHelper])@jar:file:///home/qux/.mozilla/firefox/profile0/extensions/%7B19503e42-ca3c-4c27-b1e2-9cdb2170ee34%7D.xpi!/components/flashgotService.js:739

Dispatch done in ms1668
Total processing time: ms1701
Preprocessing done in ms56
Starting dispatch
ReferenceError: shellExec is not defined
([object Array],0)@chrome://flashgot/content/DMS.js:728
([object Array],0)@chrome://flashgot/content/DMS.js:329
([object Array],0)@chrome://flashgot/content/DMS.js:319
()@jar:file:///home/qux/.mozilla/firefox/profile0/extensions/%7B19503e42-ca3c-4c27-b1e2-9cdb2170ee34%7D.xpi!/components/flashgotService.js:627
([object XPCWrappedNative_NoHelper])@jar:file:///home/qux/.mozilla/firefox/profile0/extensions/%7B19503e42-ca3c-4c27-b1e2-9cdb2170ee34%7D.xpi!/components/flashgotService.js:739

Dispatch done in ms1498
Total processing time: ms1556
Sorting again 316 links
Preprocessing done in ms256
Starting dispatch
ReferenceError: shellExec is not defined
([object Array],1)@chrome://flashgot/content/DMS.js:728
([object Array],1)@chrome://flashgot/content/DMS.js:329
([object Array],1)@chrome://flashgot/content/DMS.js:319
()@jar:file:///home/qux/.mozilla/firefox/profile0/extensions/%7B19503e42-ca3c-4c27-b1e2-9cdb2170ee34%7D.xpi!/components/flashgotService.js:627
([object XPCWrappedNative_NoHelper])@jar:file:///home/qux/.mozilla/firefox/profile0/extensions/%7B19503e42-ca3c-4c27-b1e2-9cdb2170ee34%7D.xpi!/components/flashgotService.js:739

Dispatch done in ms2803
Total processing time: ms3061
[/size]

Re: [feature request] support noexec at temp dir in linux

Posted: Sun Jun 12, 2011 1:04 pm
by Giorgio Maone
Please check rc5, thanks.

Re: [feature request] support noexec at temp dir in linux

Posted: Sun Jun 12, 2011 4:16 pm
by qux
Sorry, same result as rc4. No flashgot-*.fgt is created and no download is starting with either noexec or usual mount options. However, log contains some other error:

Code: Select all

*** FlashGot 1.3.0.2rc5 started at Sun, 12 Jun 2011 16:09:15 GMT ***
Per-session init started
Per-session init done in 40ms
Running /bin/sh /tmp/flashgot.profile0/flashgot.fgt -- blocking
Native execution time 102
Aria|KO
Downloader 4 X (nt)|KO
Downloader 4 X|KO
GNOME Gwget|KO
/usr/bin/kget
KDE KGet|OK
wxDownload Fast|KO
Axel|KO
/usr/bin/curl
cURL|OK
FatRat|KO
Prozilla|KO
/usr/bin/wget
Wget|OK
Uget|KO
/usr/bin/aria2c
Aria 2|OK
Steadyflow|KO

Warning: download manager wxDownload Fast not found
Warning: download manager Uget not found
Warning: download manager TrueDownloader not found
Warning: download manager Thunder (Old) not found
Warning: download manager Thunder not found
Warning: download manager Steadyflow not found
Warning: download manager Star Downloader not found
Warning: download manager Speed Download Lite not found
Warning: download manager Speed Download not found
Warning: download manager ReGet not found
Warning: download manager Prozilla not found
Warning: download manager Orbit not found
Warning: download manager NetAnts not found
Warning: download manager Net Transport 2 not found
Warning: download manager Net Transport not found
Warning: download manager Mass Downloader not found
Warning: download manager LeechGet 2002 not found
Warning: download manager LeechGet not found
Warning: download manager Leech not found
Warning: download manager JDownloader not found
Warning: download manager Internet Download Manager not found
Warning: download manager Internet Download Accelerator not found
Warning: download manager InstantGet not found
Warning: download manager iGetter Win not found
Warning: download manager iGetter not found
Warning: download manager HiDownload not found
Warning: download manager GNOME Gwget not found
Warning: download manager GigaGet not found
Warning: download manager GetRight not found
Warning: download manager FreshDownload not found
Warning: download manager Free Download Manager not found
Warning: download manager Folx not found
Warning: download manager FlashGet 2.x not found
Warning: download manager FlashGet 2 not found
Warning: download manager FlashGet not found
Warning: download manager FatRat not found
Warning: download manager DTA (Turbo) not found
Warning: download manager DTA not found
Warning: download manager Downloader 4 X (nt) not found
Warning: download manager Downloader 4 X not found
Warning: download manager Download Master not found
Warning: download manager Download Accelerator Plus not found
Warning: download manager BitComet not found
Warning: download manager Axel not found
Warning: download manager Aria not found
Download managers detection done in 133ms
JDownloader response:
0

Preprocessing done in ms56
Starting dispatch
TypeError: s.replace is not a function
([object XPCWrappedNative_NoHelper])@chrome://flashgot/content/DMS.js:712
([object Array],0)@chrome://flashgot/content/DMS.js:728
([object Array],0)@chrome://flashgot/content/DMS.js:329
([object Array],0)@chrome://flashgot/content/DMS.js:319
()@jar:file:///home/qux/.mozilla/firefox/profile0/extensions/%7B19503e42-ca3c-4c27-b1e2-9cdb2170ee34%7D.xpi!/components/flashgotService.js:627
([object XPCWrappedNative_NoHelper])@jar:file:///home/qux/.mozilla/firefox/profile0/extensions/%7B19503e42-ca3c-4c27-b1e2-9cdb2170ee34%7D.xpi!/components/flashgotService.js:739

Dispatch done in ms3734
Total processing time: ms3791
Preprocessing done in ms152
Starting dispatch
TypeError: s.replace is not a function
([object XPCWrappedNative_NoHelper])@chrome://flashgot/content/DMS.js:712
([object Array],0)@chrome://flashgot/content/DMS.js:728
([object Array],0)@chrome://flashgot/content/DMS.js:329
([object Array],0)@chrome://flashgot/content/DMS.js:319
()@jar:file:///home/qux/.mozilla/firefox/profile0/extensions/%7B19503e42-ca3c-4c27-b1e2-9cdb2170ee34%7D.xpi!/components/flashgotService.js:627
([object XPCWrappedNative_NoHelper])@jar:file:///home/qux/.mozilla/firefox/profile0/extensions/%7B19503e42-ca3c-4c27-b1e2-9cdb2170ee34%7D.xpi!/components/flashgotService.js:739

Dispatch done in ms1497
Total processing time: ms1670
Preprocessing done in ms127
Starting dispatch
TypeError: s.replace is not a function
([object XPCWrappedNative_NoHelper])@chrome://flashgot/content/DMS.js:712
([object Array],0)@chrome://flashgot/content/DMS.js:728
([object Array],0)@chrome://flashgot/content/DMS.js:329
([object Array],0)@chrome://flashgot/content/DMS.js:319
()@jar:file:///home/qux/.mozilla/firefox/profile0/extensions/%7B19503e42-ca3c-4c27-b1e2-9cdb2170ee34%7D.xpi!/components/flashgotService.js:627
([object XPCWrappedNative_NoHelper])@jar:file:///home/qux/.mozilla/firefox/profile0/extensions/%7B19503e42-ca3c-4c27-b1e2-9cdb2170ee34%7D.xpi!/components/flashgotService.js:739

Dispatch done in ms1864
Total processing time: ms2011
Preprocessing done in ms44
Starting dispatch
TypeError: s.replace is not a function
([object XPCWrappedNative_NoHelper])@chrome://flashgot/content/DMS.js:712
([object Array],0)@chrome://flashgot/content/DMS.js:728
([object Array],0)@chrome://flashgot/content/DMS.js:329
([object Array],0)@chrome://flashgot/content/DMS.js:319
()@jar:file:///home/qux/.mozilla/firefox/profile0/extensions/%7B19503e42-ca3c-4c27-b1e2-9cdb2170ee34%7D.xpi!/components/flashgotService.js:627
([object XPCWrappedNative_NoHelper])@jar:file:///home/qux/.mozilla/firefox/profile0/extensions/%7B19503e42-ca3c-4c27-b1e2-9cdb2170ee34%7D.xpi!/components/flashgotService.js:739

Dispatch done in ms1200
Total processing time: ms1245
[/size]

Re: [feature request] support noexec at temp dir in linux

Posted: Sun Jun 12, 2011 8:37 pm
by Giorgio Maone
Please check rc6, thanks.

Re: [feature request] support noexec at temp dir in linux

Posted: Mon Jun 13, 2011 8:33 am
by qux
rc6 prints following error:

Code: Select all

xterm: Can't execvp /bin/sh/tmp/flashgot.profile0/flashgot-1.fgt: Not a directory
It's just a missing space after "/bin/sh/", I think.
Also I was wrong about -e option: it takes all parameters to the end of command line.

Re: [feature request] support noexec at temp dir in linux

Posted: Mon Jun 13, 2011 10:56 am
by Giorgio Maone
Please check rc7, thanks.

Re: [feature request] support noexec at temp dir in linux

Posted: Mon Jun 13, 2011 11:22 am
by qux
It works. Cool feature, thank you!