Koozali.org: home of the SME Server
Legacy Forums => General Discussion (Legacy) => Topic started by: Harry on June 10, 2003, 11:00:40 PM
-
Help,
How must i change a ftp port 21 to 2121.
I read it on the forum but it is not working under my e-smith 5.6 server.
I change the follo files. Than i can not stop en start ftppro service.
I get the follo message
[root@server etc]# service proftpd start
Starting proftpd: server.smitti.mine.nu - Fatal: Socket operation on non-socket
server.smitti.mine.nu - (Running from command line? Use ServerType standalone' in config file!)
[ FAILED ]
Ftp is well working insite my netwerk but i can not connetting to my ftp from the internet.
I readthis the log:
din 10 18:48:58 server proftpd[3291]: server.smitti.mine.nu (xxx.xxx.xxx.xxx[xxx.xxx.xxx.xxx]) - Refused PORT 192,168,0,101,6,0 (address mismatch).
Has some any ideas what I am doing wrong ?
Make a file /etc/e-smith/templates-custom/etc/xinetd.conf/30ftp
ie. mkdir -p /etc/e-smith/templates-custom/etc/xinetd.conf/
cp /etc/e-smith/templates/etc/xinetd.conf/30ftp \
/etc/e-smith/templates-custom/etc/xinetd.conf/30ftp
and make the following changes (service -> unlisted, add port, add protocol, add type)
{
my $status = db_get_prop($confref, "ftp", "status") || "disabled";
unless ($status eq "enabled")
{
$OUT .= "\n";
$OUT .= "# proftpd is not enabled in the e-smith services database.";
return;
}
my $accessLimits = db_get_prop($confref, "ftp", "accessLimits") || "private"
;
if ($accessLimits eq "off")
{
$OUT .= "\n";
$OUT .= "# ftp access limits has been set to 'disabled entirely'\n";
$OUT .= "# in the e-smith services database.\n";
return;
}
$OUT .= "service proftpd\n";
$OUT .= "{\n";
$OUT .= " protocol = tcp\n";
$OUT .= " port = \n";
$OUT .= " socket_type = stream\n";
$OUT .= " wait = no\n";
$OUT .= " user = root\n";
$OUT .= " server = /usr/sbin/in.proftpd\n";
$OUT .= "}";
}
ie. replace that with your desired port... (make sure its not something used by another running service /etc/services)
then expand your xinetd.conf file
/sbin/e-smith/expand-template /etc/xinetd.conf
and you should have a section like
service proftpd
{
protocol = tcp
port = 2121
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.proftpd
}
-
Try restarting xinetd, not proftpd.
Terry
-
No its not the solution.
-
Well, works for me on 5.5, never tried it on 5.6 but I think others have.