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 -u000If 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 inetdto find the inetd process. For example, you may see the following:
root 371 1 0 Jul-01 ? 00:00:16 /etc/inetdNow you can just send the SIGHUP signal to the process:
kill -1 371This 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 055You 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?"