cancel
Showing results for 
Search instead for 
Did you mean: 

ftp bind adress

nramdoo
Champ in-the-making
Champ in-the-making
Hello,
I am on a server with two  ip adress and there is already one ftp server (non alfresco) using the port 21.
When i tried assign a new port 2121 or another one to the alfresco ftp server, i have the following errors. How can i solved the errors

Statut : Connexion à ….ipadress..
Statut : Connexion établie, attente du message d'accueil…
Réponse :           220 FTP server ready
Commande :     USER UUUUUU
Réponse :           331 User name okay, need password for UUUUUU
Commande :     PASS ************
Réponse :           230 User logged in, proceed
Commande :     SYST
Réponse :           215 UNIX Type: Java FTP Server
Commande :     FEAT
Réponse :           211-Features supported
Réponse :           MDTM
Réponse :           SIZE
Réponse :           UTF8
Réponse :           MLST size*;modify*;create*;type*;unique*;perm*;media-type*;
Réponse :           MLSD
Réponse :           211 END
Commande :     OPTS UTF8 ON
Réponse :           200 OPTS UTF8 ON
Statut : Connecté
Statut : Récupération du contenu du dossier…
Commande :     PWD
Réponse :           257 "/"
Commande :     TYPE I
Réponse :           200 Command OK
Commande :     PASV
Réponse :           227 Entering Passive Mode (XXX.XXX.XXX.,2,168,127)
Commande :     MLSD
Réponse :           150 File status okay, about to open data connection
Erreur : Délai d'attente expiré
Erreur : Échec lors de la récupération du contenu du dossier

************************************
I would like to be able to bind the ftp server to a particular ip adress and to use port 21 wihout being in conflict with the already installed ftp.

I already spent a lot of time to solve  this problem wihout success
Thanks for your help
8 REPLIES 8

zladuric
Champ on-the-rise
Champ on-the-rise
I'm not sure, but I think you should look for   <bindto>${cifs.bindto}</bindto> in file-servers.xml.

muralie39
Champ on-the-rise
Champ on-the-rise
open jconsole  & goto "beans" check the ftp Attributes& change the port num here & open the operations, which below it & click on void method.. it will change
the ftp port number on fly, without restarting of alfresco.

nramdoo
Champ in-the-making
Champ in-the-making
Thank you
sorry for replying so late.
In fact, i don't have any graphical interface on the server
Thanks

zladuric
Champ on-the-rise
Champ on-the-rise
Well, try this: connect to the server, edit (with vi or nano or whatever you use) the <tomcat_home>/webapps/alfresco/WEB-INF/classes/alfresco/subsystems/default/file-servers.properties file.
Find the ftp server configuration bit and change the port. For example, mine (on my devel server) looks like this:

### FTP Server Configuration ###
ftp.enabled=true
ftp.port=221
ftp.ipv6.enabled=false

You would obviously need to set the ftp.port bit to 2121. Then restart the server.

nramdoo
Champ in-the-making
Champ in-the-making
Hello zladuric,
Thank you for your answer.
in fact i need to user the port 21 because the message that i am having seems to be due to restriction on the router.
The server has two ip adresses and i can"t bind the port 21 to the correct ip.
Actually on the server i have the following addresses
XXX.XX.XXX.1
XXX.XX.XXX.2

On the adress 1 there is already a ftp using the port 21.
in my file servers config i did the ftp ip adresse to XXX.XX.XXX.2
and port 21.

The FTP server refuses to start and tell me that the port 21 is already being used.

Bye

zladuric
Champ on-the-rise
Champ on-the-rise
Oh, then you don't have the ftp port to set up - you have to configure the IP or hostname.
I don't know exactly, but I think you need to look for <bindto>n.n.n.n</bindto> sections in XML config files or maybe something like ftp.bindto in the resource file.

Please post your answer here when you find it Smiley Happy


Edit: It looks like I was right, this: http://wiki.alfresco.com/wiki/File_Server_Configuration wiki page, under FTP Server Configuration, says that you need to set a <bindto /> tag in file-servers.xml (or to extend it in file-servers-custom.xml

nramdoo
Champ in-the-making
Champ in-the-making
Hello,

The bind of the ftp works well. i can bind it any port 21,2121 and so on.
only the port 21 works when i am not on my local area network.
I need to use the port 21 and there is another ftp server using this port.
The server has to ip addresses and the ftp server (profptd) is bind to le address XXX.XXX.XXX.90
the command netstat -vlanp | grep 21 shows clearly
tcp        0      0 192.168.1.90:21             0.0.0.0:*                   LISTEN      3163/proftpd: (acce
I tried to bind alfresco ftp server to the address XXX.XXX.XXX.91.
i put the follwing lines in the different possible files and made many many trials

<config evaluator="string-compare" condition="FTP Server">
<debug flags="File,Search,Error,Directory,Info,DataPort"/>
<bindto>XXXX.XXX.XXX.90</bindto>
</config>

or having the right values in the file-server.properties files.

Every time it works if my proftpd in not launched.
but alfresco ftp server never binds to the address the address XXXX.XXX.XXX.90 but binds to all the available addresses.
In fact, i can connet to the alfresco ftp server by using the XXXX.XXX.XXX.90 or the XXXX.XXX.XXX.91 adress.

Do someone have any idea how to bind the alfresco ftp server to a particular ip address.

THanks

Links which i used
http://wiki.alfresco.com/wiki/Changing_Bind_Addresses_and_Ports_for_Samba_and_FTP
http://wiki.alfresco.com/wiki/File_Server_Subsystem#Running_SMB.2FCIFS_from_a_normal_user_account
and so many others

nramdoo
Champ in-the-making
Champ in-the-making
hello
Finally solved.

the useful link is this one (thanks to Steve Rigby  )
http://wiki.alfresco.com/wiki/File_Server_Subsystem#Advanced_Spring_Overrides
I read it several times before, but it didn't help me because i misspelled bindto
Should be bindTo (yes big t).

The steps
create, if necessary the following folder
tomcat/shared/classes/alfresco/extension/subsystems/fileServers/default/default

yes default/default folder.
copy the following files to this folder
cp tomcat/webapps/alfresco/WEB-INF/classes/alfresco/subsystems/fileServers/default/*  to the newly created folder

add the following lines in the .properties file

### FTP Server Configuration ###
ftp.bindTo=your ip address
ftp.enabled=true
ftp.port=21
ftp.ipv6.enabled=false
…………..
and these ones to the custom-file-servers-context.xml

<property name="bindTo">
         <value>${ftp.bindTo}</value>
</property>
mind the big t in bindTo.

and finally restart alfresco
For me this works and I really binded my alfresco ftp server to the correct ip address.