Technical article 109542

I get the message "ftpd: Bad value for -u" when using the -u option for ftpd.

OpenServer 5.0.0OpenServer 5.0.2OpenServer 5.0.4OpenServer 5.0.5

Written · Last revised

Problem

I am trying to set the umask option with ftpd in the /etc/inetd.conf file. I was able to use the following syntax in Open Server 3.0, which allowed the put command to transfer text files with a permission of 666:

ftp     stream  tcp     nowait  NOLUID  /etc/ftpd       ftpd -u000

If I edit the same line in my OpenServer 5.0.x system for the same purpose, I get the following message when using ftp:

ftpd: Bad value for -u

Cause

If the umask in OpenServer 5.0.x is less than or equal to 0, or greater than 0777, it will print the above error message. In Open Server 3.0 (UNIX Version 4.2) or UnixWare 7, a umask of 0 is allowed.

Solution

This issue has been fixed in SCO OpenServer 5.0.5, with Release Supplement 505A (rs505a).

To get permissions of 666, pass "-u 111" to ftpd in /etc/inetd.conf. After making the change, run the command:

ps -ef | grep inetd

to find the inetd process. For example, you may see the following:

root   371     1  0   Jul-01       ?    00:00:16 /etc/inetd

Now you can just send the SIGHUP signal to the process:

kill -1 371

This will allow your change to take effect.

NOTES:    If you don't require a permanent umask with ftp, you can use the
          umask command while in ftp. For example, if you  want to transfer
          a file with permissions 622 you could do the following:
ftp to recipient machine which will bring you to the ftp prompt:
ftp>

Now enter the umask command at the ftp prompt:

ftp> umask 055

You will see a response similar to the following, depending on your existing umask:

200 UMASK set to 055 (was 027)

Now transfer the file with your desired permissions.

See also

ta109909, "What is Release Supplement 505A for SCO OpenServer Release 5.0.5?"

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