Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8581571
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:05:08+00:00 2026-06-11T21:05:08+00:00

I’m trying to FTP a file to a server where the password contains an

  • 0

I’m trying to FTP a file to a server where the password contains an ampersand (&) via ANT
The following ANT target:

<target name="upload_zip">
    <ftp server="myhost.net"
         userid="myusername"
         password="topsecret&amp;"
         port="21"
         remotedir="/public_html"
         passive="yes"
         binary="yes">
        <fileset dir=".">
            <include name="${updatefile}"   />
        </fileset>
    </ftp>
</target>

Fails with this message:

error during FTP transfer:  java.net.SocketException: Permission denied: recv failed  
   at java.net.SocketInputStream.socketRead0(Native Method) 
   at java.net.SocketInputStream.read(SocketInputStream.java:150)  
   at ... // really long stack trace

It looks like the authentication isn’t successful. If I don’t escape the ampersand, then my build file is not well formed. Am I escaping the ampersand correctly or doing something wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T21:05:10+00:00Added an answer on June 11, 2026 at 9:05 pm

    I don’t think there’s an obvious problem with the method you are using – the entity should be translated correctly.

    To diagnose automated ftp it’s probably best to try a similar (or identical!) transfer manually first. Usually that will reveal any external issues with connection credentials or permissions in the target file system.

    If a manual transfer works, then the next step would be to ‘spot the difference’ between the manual transfer and the Ant-driven one.

    A stack trace for an ftp problem is probably indicative of a pre-connect issue – once you have a connection, you’ll instead see an FTP error message, e.g.:

    • Could not login to FTP server

    That would probably indicate a problem with the login-password combination.

    If the server is down you’ll get a trace with something like:

    • java.net.ConnectException: Connection refused

    It seems though in your case it was a problem with an intermediate proxy. For future readers, this resource may help in diagnosing passive ftp through firewall issues.

    Failing all that, running Ant in verbose (-v) or diagnostic (-diagnostics) modes to see the innards of what Ant is doing may also give a clue.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I have just tried to save a simple *.rtf file with some websites and
I want use html5's new tag to play a wav file (currently only supported

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.