cancel
Showing results for 
Search instead for 
Did you mean: 

FTP - connection refused

binu
Champ in-the-making
Champ in-the-making
Hi,

I need to enable FTP on my Alfresco Server. I had followed the steps narrated in http://forums.alfresco.com/fr/viewtopic.php?f=6&t=1810 for setting up FTP. In my Alfresco setup, the file-servers-custom.xml file resides in /usr/local/alfresco/tomcat/shared/classes/alfresco/extension. After making changes to the xml file, When I open ftp using the link ftp://9.0.0.114:2021/alfresco (9.0.0.114 is the IP of the Server), the ftp site doesn't open. It prompts to enter the username and password but doesn't open the folders.

My file-servers-custom.xml file is as given below:-

<config evaluator="string-compare" condition="FTP Server">
      <serverEnable enabled="true"/>
      <port>2021</port>
<bindto>9.0.0.114</bindto>
<rootDirectory>/Alfresco</rootDirectory>
      <charSet>UTF8</charSet>
</config>


Even when I try to connect to ftp from the command prompt. I get the following error.

root@administrator:/usr/bin# ftp localhost
ftp: connect: Connection refused
ftp>

Should I start the ftp service, I am not sure whether ftp or sftp is installed and its location.

Can anyone help me how to fix this issue.


Thanks

Binu Manickkam.
15 REPLIES 15

mrogers
Star Contributor
Star Contributor
Well your command prompt stuff probably won't work even with a correctly running server.
a) you are using the local loopback address when you bound your ftp server to 9.0.0.114
b) you havn't specified the right port.

When you connect to ftp://9.0.0.114:2021/alfresco and see a log in that's a good sign.  
Do you manage to sign on successfully?    Which account do you log in as?

binu
Champ in-the-making
Champ in-the-making
Hi,

Thanks for the Reply.

My file-servers-custom.xml file is residing in /usr/local/alfresco/tomcat/shared/classes/alfresco/extension/file-servers-custom.xml.  The FTP configuration made in it is given below:-

<config evaluator="string-compare" condition="FTP Server">
<serverEnable enabled="true"/>
<port>2021</port>
<bindto>9.0.0.114</bindto>
<rootDirectory>/Alfresco</rootDirectory>
<charSet>UTF8</charSet>
</config>

i have specified port 2021.  Is my file-servers-custom.xml file configuration correct.

(b) When I browse using ftp://9.0.0.114:2021/alfresco i get a pop-up window for the user name and password.  I tried both with the admin user account and normal user.  It doesn't accept the password at all and the pop-up keeps coming again and again.


Please help me to resolve this issue.


Thanks


Binu Manickkam.

binu
Champ in-the-making
Champ in-the-making
Hi,

MY issue is not yet solved.  Can anyone help me out.

Thanks

Binu

binu
Champ in-the-making
Champ in-the-making
Hi,

I just installed Alfresco Community 3.2 in Ubuntu 8.04.  How can i use FTP in this.  Can anyone help me with any guidelines for the same.

Thanks

Binu.

zhangyingda
Champ in-the-making
Champ in-the-making
I try the config like this, but in the version 3.2r,the ftp server can't bind to ip 192.168.0.208,it listen all the interfaces ip! So I thought maybe the version 3.2r have a bug that it can't bind the ftp server to a single ip!

<config evaluator="string-compare" condition="FTP Server">^M
      <serverEnable enabled="true"/>
      <port>2121</port>
      <bindto>192.168.0.208</bindto>

zhangyingda
Champ in-the-making
Champ in-the-making
OK, Now I found why the version 3.2r ftp server can't bind the single ip address.

debian:/srv/Alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/subsystems/fileServers/default# vim file-servers-context.xml
<bean id="ftpServerConfig" class="org.alfresco.filesys.config.FTPConfigBean">
      <property name="serverEnabled">
         <value>${ftp.enabled}</value>
      </property>

      <property name="port">
         <value>${ftp.port}</value>
      </property>

      <property name="bindTo">
          <value>192.168.0.208</value>
      </property>


      <property name="charSet">
          <value>UTF8</value>
      </property>

binu
Champ in-the-making
Champ in-the-making
Hi,

Thanks for the reply.  It worked with Alfresco 3.2 version. Changes were made to the file-servers-custom.xml file and it worked fine.

But, when I try the same coding with Alfresco 2.1, i get the pop up to enter the username and password. This always says like incorrect username and password. The ftp site is ftp://9.0.0.114:2021/

The URL to my alfresco 2.1 is like - http://9.0.0.114:8081

The file-servers-custom.xml file of Alfresco 2.1 is given below.

<alfresco-config area="file-servers">
<config evaluator="string-compare" condition="CIFS Server">
      <serverEnable enabled="true"/>
      <host name="${localname}_A"/>
      <comment>Alfresco CIFS Server</comment>
      <broadcast>255.255.255.255</broadcast>
      <tcpipSMB platforms="linux,solaris,macosx"/>
      <netBIOSSMB platforms="linux,solaris,macosx"/>
      <tcpipSMB port="1445" platforms="linux,solaris,macosx"/>
      <netBIOSSMB sessionPort="1139" namePort="1137" datagramPort="1138" platforms="linux,solaris,macosx"/>
      <hostAnnounce interval="5"/>
      <sessionDebug flags="Negotiate,Socket"/>
   </config>
  <!– To override the default Alfresco filesystem use replace="true", to –>
   <!– add additional filesystems remove the replace="true" attribute     –>
  
<config evaluator="string-compare" condition="FTP Server">
      <serverEnable enabled="true"/>
      <port>2021</port>
<bindto>9.0.0.114</bindto>
      <charSet>UTF8</charSet>
</config>

   <config evaluator="string-compare" condition="Filesystems" replace="true">
      <filesystems>

         <filesystem name="Alfresco">
            <store>workspace://SpacesStore</store>
            <rootPath>/app:company_home</rootPath>

            <!– Add a URL file to each folder that links back to the web client –>
            <urlFile>
               <filename>__Alfresco.url</filename>
               <webpath>http://${localname}:8081/</webpath>
            </urlFile>

            <!– Mark locked files as offline –>
            <offlineFiles/>

            <!– Desktop actions –>

            <desktopActions>
               <global>
                  <path>alfresco/desktop/Alfresco.exe</path>
                  <webpath>http://${localname}:8081/</webpath>
               </global>
               <action>
                  <class>org.alfresco.filesys.repo.desk.CheckInOutDesktopAction</class>
                  <name>CheckInOut</name>
                  <filename>__CheckInOut.exe</filename>
               </action>
               <action>
                  <class>org.alfresco.filesys.repo.desk.JavaScriptDesktopAction</class>
                  <name>JavaScriptURL</name>
                  <filename>__ShowDetails.exe</filename>
                  <script>alfresco/desktop/showDetails.js</script>
                  <attributes>anyFiles</attributes>
                  <preprocess>copyToTarget</preprocess>
               </action>

            </desktopActions>

<!–
            <accessControl default="Write">
               <user name="admin" access="Write"/>
               <address subnet="90.1.0.0" mask="255.255.0.0" access="Write"/>
            </accessControl>
–>
         </filesystem>
       
       <!– AVM virtualization view of all stores/versions for WCM –>
         <avmfilesystem name="AVM">
            <virtualView/>
         </avmfilesystem>
       
      </filesystems>
   </config>

</alfresco-config>


Thanks .

Binu Manickkam.

newmember
Champ in-the-making
Champ in-the-making
Alfresco Community 3.2
Ubuntu 9.04

vi /usr/share/tomcat6/shared/classes/alfresco-global.properties

add: (select the port for your system, mine is 2121

# FTP
#————-
ftp.enabled=true
ftp.port=2121


Add the following to iptables:
REDIRECT   tcp  –  anywhere             anywhere            tcp dpt:ftp redir ports 2121
REDIRECT   udp  –  anywhere             anywhere            udp dpt:fsp redir ports 2121

binu
Champ in-the-making
Champ in-the-making
Hi,

I am using Version 2.1 and could not find any file like alfresco-global.properties to make the changes.
Would you please guide as to which files in version 2.1 the changes needs to be made.


Thanks
Binu Manickkam.