cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco as ftp-server

leitoo0
Champ in-the-making
Champ in-the-making
Hello,

I have configured Alfresco and the web front end works but now I want to configure Alfresco ftp server:
I have the following entries in /usr/share/tomcat/tomcat-2/shared/classes/alfresco-global.properties:


[…]

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

[…]


But the ftp server seems not to work. When I try to connect to ftp localhost:1121/alfresco
I get the following error : ftp: localhost:1121/alfresco: Name or service not known

I really don't know what to do now ? Can somebody help me ?
Thanks in advance.
14 REPLIES 14

mrogers
Star Contributor
Star Contributor
Are you connecting from the same machine or a different one?   If different then "localhost" will not work.   Also what O.S. are you using since the networking is different.  

There should be a log message from the "filesystem subsystem" confirming that the ftp server has started correctly,  do you see it?

Also try to connect to the host's external IP address rather than "localhost".

leitoo0
Champ in-the-making
Champ in-the-making
Thanks for the quick answer.

I'm trying to connect from the same machine so localhost should normally works. I've also try from another machine with the IP adress, but doesn't work neither.

I'am using Fedora 17. Moreover
netstat -ntpl
don't list the port 1121 as listened

Where can be this log file (filesystem subsystem) located ?

Thanks in advance.

leitoo0
Champ in-the-making
Champ in-the-making
I have the below errors in alfresco.log :

 13:42:18,440 ERROR [org.alfresco.fileserver] [FTP] FTP Socket error : java.net.BindException: Permission denied
13:42:18,447 ERROR [org.alfresco.fileserver] Error from JLAN
java.net.BindException: Permission denied
        at java.net.PlainSocketImpl.socketBind(Native Method)
        at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:376)
        at java.net.ServerSocket.bind(ServerSocket.java:376)
        at java.net.ServerSocket.<init>(ServerSocket.java:237)
        at java.net.ServerSocket.<init>(ServerSocket.java:181)
        at org.alfresco.jlan.ftp.FTPServer.run(FTPServer.java:554)
        at java.lang.Thread.run(Thread.java:722)
13:42:18,477 ERROR [org.alfresco.fileserver] [SMB] Server error : org.alfresco.jlan.server.config.InvalidConfigurationException: Error initializing TCP-IP SMB session handler, Permission denied


How to avoid this permission denied error ?
The port using for ftp is higher than 1024 (1121).

Thanks in advance.

mrogers
Star Contributor
Star Contributor
I suspect it's still trying to use port 21.  its a pity the bind exception does not have the port number…    Your config looks correct.  Is any of your config working?  And is it tomcat / tomcat 2 correct?

bisana
Champ on-the-rise
Champ on-the-rise
I think you need to use iptables to redirect request for port 21 to port 1121

leitoo0
Champ in-the-making
Champ in-the-making
Thanks for your help,

@mrogers : yes the /tomcat/tomcat-2 is correct. I tried to launch tomcat as "root" but I still have the same error. I really don't know what to do.

@bisana : I tried to redirect the port 21 using the command
iptables -t nat -A PREROUTING -p tcp –dport 21 -j REDIRECT –to-port 1121
. But don't works neither.

Any other idea ?

mrogers
Star Contributor
Star Contributor
The only other thing that it could be is the hostname or IP address that you are binding to.  Occasionaly linux boxes can have problems resolving their own hostname if the /etc/hosts (or equivalenet) file is not configured correctly.

bisana
Champ on-the-rise
Champ on-the-rise

iptables -t nat -A PREROUTING -p udp –dport 21 -j REDIRECT –to-ports 1121
iptables -t nat -A OUTPUT -d 127.0.0.1 -p tcp -m tcp –dport 21  -j REDIRECT –to-ports 1121


Hope it helps

leitoo0
Champ in-the-making
Champ in-the-making
Thanks again for your help. I think my problem come in fact upstream.
It look like my
alfresco-global.properties
isn't used by alfresco, I notice that Alfresco try to use port 21.

I setted up two instance in addition of the Tomcat home instance. So :
- one for CMDBuild located at
/usr/share/tomcat/tomcat-1/

- a second for Alfresco located at
/usr/share/tomcat/tomcat-2/

- and the Home tomcat directory at
/usr/share/tomcat6/
.

I put every correctly every Alfresco file in
/usr/share/tomcat/tomcat-2/
in webapps and shared directory. My
alfresco-global.properties
file is located at
/usr/share/tomcat/tomcat-2/shared/alfresco
.This file contains :


[…]
dir.root=/var/alfresco/alf_data/
dir.keystore=${dir.root}/keystore
[…]


but I recently notice that alfresco put his files to :
/usr/share/tomcat6/alf_data/
instead of
/var/alfresco/alf_data/
. I don't know why ?!

How to check wheter alfresco use my properties file or non ?

Thanks in advance.