Technical article 107639

I get "ftpd[xxxx]: #2 open of pid file failed: No such file or directory".

OpenServer 5.0.0OpenServer 5.0.2OpenServer 5.0.4OpenServer 5.0.5

Written · Last revised

Problem

In the /usr/adm/syslog, the message:

ftpd[xxxx]: #2 open of pid file failed: No such file or directory

continues to appear even though there does not appear to be a problem with ftp. The [xxxx] is the ftpd process ID number.

Cause

The ftp(TC) program expects that the directory /usr/tmp/ftpd exists.
Within this directory is the ftp.pids-all file that ftp uses.
/usr/lib/cleantmp is a shell script that is run by cron on a daily
basis.  The script queries the subdirectory trees that are specified
in /etc/default/cleantmp (initially TMPDIRS are /tmp and /usr/tmp)
and removes the files that are older than the aging days (initially
FILEAGING is 7).  It does not consider whether the "file" is a
symbolic link.
/usr/tmp/ftpd is really a symbolic link pointing to the
/var/opt/K/SCO/tcp/2.x.xCl/usr/tmp/ftpd directory.  This
symbolic link is created through the scoadmin software verify
function.  When cron runs cleantmp on /usr/tmp and this
symbolic link is older than the aging days (7), the symbolic
link is removed.  Then, without /usr/tmp/ftpd being there,
every time someone ftp's and logs in to the system (whether
the user is "real" or anonymous) the error message is logged
to /usr/adm/syslog file complaining about the missing pid file.

Solution

There are several workarounds available.  Select the one that
suits your needs the best.
1. The quickest solution is simply to remove /usr/tmp from the list
   of subdirectories that cleantmp will query.  The drawback here is
   that none of the /usr/tmp tree will be automatically cleaned up.
2. A more thorough solution is to exclude the ftpd symbolic link from
   being removed.  To do this, follow these steps:
A. Edit the file /usr/lib/cleantmp

B. Change the /bin/find line (line 87 in OpenServer 5.0.0). Note: the "^^^^" indicate the option to be added.

FROM:

/bin/find $i ! -type p ! -type d -atime +$days -exec /bin/rm -f {} \;

TO:
/bin/find $i ! -type p ! -type d ! -name ftpd -atime +$days -exec /bin/rm -f
{} \;
                                    ^^^^^^^^^^^^^

C. Using "scoadmin software manager", select the TCP/IP Runtime as:

SCO OpenServer Enterprise/Host System -> SCO OpenServer Enterprise/Host System Connectivity -> SCO TCP/IP -> TCP/IP Runtime utilities and drivers

Then, run Software Verify, checking and fixing Broken/Missing Symbolic Links.

NOTES:    The following workarounds are not recommended:
- Creating the /usr/tmp/ftpd directory.  This will simply delay the
  problem.  When software verify is done, the link will be
  reestablished, and subsequently removed after the aging days have
  elapsed.
- Truncating the /usr/adm/syslog file.  The problem with this is that
   you may lose other important information.

See also

man pages: ftp(TC); ftpd(ADMN); ln(C)

From the Xinuos technical article database, record 107639. Reproduced with permission. The original is at www.sco.com/ta/107639, 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.