Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Change filezilla server's download location #64

Open
wants to merge 4 commits into from

3 participants

@scipiojr

Since July 1st, 2013, sf has established a new program called DevShare, meaning that (some? all?) installer packages downloaded from SF will be wrapped by a custom installer, which means that the filename of the download has changed (SFInstaller_SFFZ_filezilla_10770709_.exe) and is no loanger version dependent. Also the command line switches do no longer function as known, and a silent mode is not provided, at least not documented or known to me. As a result, this packages is no longer able to build the right download url and therefor fails to download the installation file.

Fortunately, the filezilla project hosts its own copy which is the original installer, following the already-known naming pattern. I have modified the files to use this download instead of sourceforge's.

scipiojr added some commits
@scipiojr scipiojr Switch download location (ketarin.xml)
Switch download location from sourceforge to filezilla's own server as sourceforge no longer provides packages without their own sf-installer
72f7d8a
@scipiojr scipiojr Switch download location (chocolateyInstall.ps1)
Change download location from sourceforge to filezilla's own server as sf doesn't provide "unbundled" downloads any more
e825106
@ferventcoder

Total WTF for SF.

@ferventcoder

@TomOne - were you aware of SF messing up their downloads?

@TomOne

Yes, I am aware. But that DevShare thing gets only applied when the developers of the software – in this case the Filezilla developers – agree to include it. I think they also get money for it. The link to the installer with the DevShare adware is on the official FileZilla site: https://filezilla-project.org/download.php?type=server
But if you go to Show additional download options on the same site, there’s the possibility to download FileZilla Server without adware and working silent mode. But just to make sure, it is better to get the download link from the “Files” section in the official SourceForge repository: http://sourceforge.net/projects/filezilla/files/FileZilla%20Server/

The developers of GIMP moved their files away from SourceForge, because they didn’t like this advertising strategy. You can read the news from 2013-11-05 on http://www.gimp.org/ for more information. Also read this: http://www.gluster.org/2013/08/how-far-the-once-mighty-sourceforge-has-fallen/

@TomOne

@scipiojr both old and now download links of the chocolateyInstall.ps1 lead to a 404 error

This package has also another issue: it tries to write a file into the Program Files\FileZilla Server folder. If an user has UAC activated, the package will break with an access denied error.

I don’t understand at all why people deactivate UAC. It’s a good security feature that Linux already had many years before it was introduced with Windows Vista: the su or sudo command. So Microsoft did a good work in this case. But deactivating UAC throws one back to the security level of Windows XP. :smile:

@ferventcoder

@TomOne UAC is crap without a command line call like su or sudo - that's why folks deactivate it.

@TomOne

I’m sure malware authors are quite happy about that. So they can get adiminstrator rights immediately and the only barrier would be the antivirus software – if one is installed and recognizes the malware. :laughing:

But now back to the topic. I’ve found out an interesting fact: If you download FileZilla or FileZilla Server from the official SourceForge project page, with a browser, using these links

But if you download it with wget and also with Chocolatey from the same URL, it downloads the clean installer without crapware. After experimenting a little bit I discovered that it’s the user agent which makes the difference. SourceForge detects if the user has a commonly used browser and offers the crapware in that case. If for example I spoof the user agent with wget, using this command:

wget --user-agent="Mozilla/5.0 (Windows NT 6.3; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0" http://sourceforge.net/projects/filezilla/files/FileZilla_Client/3.7.3/FileZilla_3.7.3_win32-setup.exe/download

it returns a HTML page with the following meta element:

<meta http-equiv="refresh" content="5; url=http://ak.pipoffers.apnpartners.com/static/partners/dynamic/SFFZ/SFInstaller_SFFZ_filezilla_8992693_.exe">

Here we got the culprit. This is responsible for the redirection to the adware installer. :smiling_imp:

So this pull request is basically not necessary. But we need to fix the other two issues of this package:

  • Download link gives 404 error
  • Access denied error on systems with UAC active
@scipiojr

I must admit that the whole automatic package magic doesn't really work for me, so please apologize the half-baked proposal. Having said that, I also don't know how to put together the right download url, though apparently the package tries to use the version information directly where it should replace the dots by underscores.

Concerning the UAC problems:
As I already had a manual Filezilla Server installation before the discovery of Chocolatey, the checks performed by this package didn't apply to me, so I didn't realize there was a pitfall there.

I tried to address the UAC problem with another patch, but as I'm more the svn guy, I'm not really sure how to post the new proposal the "git way". I guess I should have opened a new pull request, but the context of this discussion might get lost there. If you want me to do so, let me know, for the time being, here is the corresponding diff:

69bef5bc5978ff7e327ea2b8a176bd2d722baeda
 filezilla.server/tools/chocolateyInstall.ps1 | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/filezilla.server/tools/chocolateyInstall.ps1 b/filezilla.server/tools/chocolateyInstall.ps1
index 6808761..e62595c 100644
--- a/filezilla.server/tools/chocolateyInstall.ps1
+++ b/filezilla.server/tools/chocolateyInstall.ps1
@@ -13,16 +13,18 @@ try {
   Start-sleep 8

   if (![System.IO.Directory]::Exists($tempDir)) {[System.IO.Directory]::CreateDirectory($tempDir)}
-  if (![System.IO.Directory]::Exists($fileZillaInstallDir)) {[System.IO.Directory]::CreateDirectory($fileZillaInstallDir)}
+  if (![System.IO.Directory]::Exists($fileZillaInstallDir)) {
+    Start-ChocolateyProcessAsAdmin "[System.IO.Directory]::CreateDirectory('$fileZillaInstallDir')" -validExitCodes @(0,-1073741510)
+  }

   if (![System.IO.File]::Exists("$($fileZillaInstallDir)\FileZilla Server Interface.xml")) {
     Write-Host "Copying FileZilla Server Interface.xml to install directory"
-    Copy-Item "$($toolsDir)\FileZilla Server Interface.xml" "$fileZillaInstallDir" -Force
+    Start-ChocolateyProcessAsAdmin "Copy-Item '$($toolsDir)\FileZilla Server Interface.xml' '$fileZillaInstallDir' -Force"
   }

   if (![System.IO.File]::Exists("$($fileZillaInstallDir)\FileZilla Server.xml")) {
     Write-Host "Copying FileZilla Server.xml to install directory"
-    Copy-Item "$($toolsDir)\FileZilla Server.xml" "$fileZillaInstallDir" -Force
+    Start-ChocolateyProcessAsAdmin "Copy-Item '$($toolsDir)\FileZilla Server.xml' '$fileZillaInstallDir' -Force"
   }

   Install-ChocolateyPackage 'filezilla.server' 'exe' '/S' 'http://download.filezilla-project.org/FileZilla_Server-{{PackageVersion}}.exe'

For sure it is far from beeing the perfect solution, as the user is prompted for rights elevation 3 times, but as the copy operations are only neccessary on a fresh install, I think this could be tolerated.

@ferventcoder

Ketarin allows you to change your User Agent. Just an FYI. This might help with the download issues?

@ferventcoder

Ah yeah, this could be an issue that needs resolved... :+1:

@TomOne TomOne commented on the diff
filezilla.server/tools/chocolateyInstall.ps1
((13 lines not shown))
}
if (![System.IO.File]::Exists("$($fileZillaInstallDir)\FileZilla Server.xml")) {
Write-Host "Copying FileZilla Server.xml to install directory"
- Copy-Item "$($toolsDir)\FileZilla Server.xml" "$fileZillaInstallDir" -Force
+ Start-ChocolateyProcessAsAdmin "Copy-Item '$($toolsDir)\FileZilla Server.xml' '$fileZillaInstallDir' -Force"
}
Install-ChocolateyPackage 'filezilla.server' 'exe' '/S' 'http://downloads.sourceforge.net/filezilla/FileZilla_Server-{{PackageVersion}}.exe'
@TomOne
TomOne added a note

Replace 'http://downloads.sourceforge.net/filezilla/FileZilla_Server-{{PackageVersion}}.exe'
with '{{DownloadUrl}}'. That will fix the 404 error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@TomOne

@scipiojr

For sure it is far from beeing the perfect solution, as the user is prompted for rights elevation 3 times, but as the copy operations are only neccessary on a fresh install, I think this could be tolerated.

You could run an external PowerShell script with administrator permissions. In that case the UAC prompt would appear only once. I did that in my defraggler package: https://github.com/TomOne/chocolateyautomaticpackages/blob/master/defraggler/tools/chocolateyInstall.ps1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 18, 2014
  1. @scipiojr

    Switch download location (ketarin.xml)

    scipiojr authored
    Switch download location from sourceforge to filezilla's own server as sourceforge no longer provides packages without their own sf-installer
  2. @scipiojr

    Switch download location (chocolateyInstall.ps1)

    scipiojr authored
    Change download location from sourceforge to filezilla's own server as sf doesn't provide "unbundled" downloads any more
Commits on Jan 19, 2014
  1. @scipiojr
  2. @scipiojr
This page is out of date. Refresh to see the latest.
View
4 filezilla.server/filezilla.server.ketarin.xml
@@ -78,7 +78,7 @@
<FileHippoId />
<LastUpdated>2012-05-23T03:39:28.3341549</LastUpdated>
<TargetPath>C:\Chocolatey\_work\</TargetPath>
- <FixedDownloadUrl>http://hivelocity.dl.sourceforge.net/project/filezilla/FileZilla%20Server/{version}/FileZilla_Server-{versionUnderscore}.exe</FixedDownloadUrl>
+ <FixedDownloadUrl>http://download.filezilla-project.org/FileZilla_Server-{versionUnderscore}.exe</FixedDownloadUrl>
<Name>filezilla.server</Name>
</ApplicationJob>
-</Jobs>
+</Jobs>
View
8 filezilla.server/tools/chocolateyInstall.ps1
@@ -13,16 +13,18 @@ try {
Start-sleep 8
if (![System.IO.Directory]::Exists($tempDir)) {[System.IO.Directory]::CreateDirectory($tempDir)}
- if (![System.IO.Directory]::Exists($fileZillaInstallDir)) {[System.IO.Directory]::CreateDirectory($fileZillaInstallDir)}
+ if (![System.IO.Directory]::Exists($fileZillaInstallDir)) {
+ Start-ChocolateyProcessAsAdmin "[System.IO.Directory]::CreateDirectory('$fileZillaInstallDir')" -validExitCodes @(0,-1073741510)
+ }
if (![System.IO.File]::Exists("$($fileZillaInstallDir)\FileZilla Server Interface.xml")) {
Write-Host "Copying FileZilla Server Interface.xml to install directory"
- Copy-Item "$($toolsDir)\FileZilla Server Interface.xml" "$fileZillaInstallDir" -Force
+ Start-ChocolateyProcessAsAdmin "Copy-Item '$($toolsDir)\FileZilla Server Interface.xml' '$fileZillaInstallDir' -Force"
}
if (![System.IO.File]::Exists("$($fileZillaInstallDir)\FileZilla Server.xml")) {
Write-Host "Copying FileZilla Server.xml to install directory"
- Copy-Item "$($toolsDir)\FileZilla Server.xml" "$fileZillaInstallDir" -Force
+ Start-ChocolateyProcessAsAdmin "Copy-Item '$($toolsDir)\FileZilla Server.xml' '$fileZillaInstallDir' -Force"
}
Install-ChocolateyPackage 'filezilla.server' 'exe' '/S' 'http://downloads.sourceforge.net/filezilla/FileZilla_Server-{{PackageVersion}}.exe'
@TomOne
TomOne added a note

Replace 'http://downloads.sourceforge.net/filezilla/FileZilla_Server-{{PackageVersion}}.exe'
with '{{DownloadUrl}}'. That will fix the 404 error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.