Technical article 109631

Can the port number of the remote ftp server be specified in the ftp_api(SLIB)?

OpenServer 5.0.4

Written · Last revised

Problem

I want to be able to specify the port number of the remote ftp server within my program that uses the ftp_api(SLIB). Is this possible?

Solution

The ftp_api(SLIB) doesn't support setting the port number. It uses the port number that is specified for the ftp service in /etc/services.

An enhancement to ftp_api(SLIB) that supports this has been requested for a future release of the SCO OpenServer Development System.

A different port number can be used by changing the "ftp" entry in /etc/services. For example, if you want to use port number 7770, change:

ftp             21/tcp
to:
ftp             7770/tcp
NOTE:     Do this only if you do not use ftpd(ADMN) on your system.

This modification causes ftpd(ADMN) to also use port number 7770 the next time inetd(ADMN) restarts, or the system is rebooted.

See also

The manual pages for ftp_api(SLIB), services(SFF) and inetd(ADMN).

From the Xinuos technical article database, record 109631. Reproduced with permission. The original is at www.sco.com/ta/109631, which is reachable but blocked from search engines. Xinuos marks this article against a retired product line. That refers to the product’s lifecycle, not to whether the advice still works — plenty of it still applies to running systems.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.