Subject: default umask

From: Jüri Kaljundi <[email-masked]>
Date: Thu, 8 Aug 1996 00:47:22 +0300 (EET DST)

I am having problems with setting the default umask of anonymous ftp users
uploads. 

I know there is the -u option to ftpd, but although I have tried to add
either -u022 or -u077 to /etc/inetd.conf, the files are still created with
664 permissions. We have a large number of users, so setting the umask
for each of them in ftpaccess config file is not the best solution :(

Any way to change the umask to be 022 ?

Jüri Kaljundi
AS Stallion
[email-masked]

---

From: Michael Brennen <[email-masked]>
Date: Wed, 7 Aug 1996 17:01:56 -0500 (CDT)

> Any way to change the umask to be 022 ?

In ftpd.c change CMASK to 022 instead of the default 002:

#if !defined(CMASK) || CMASK == 0
#undef CMASK
#define CMASK 022
#endif

   -- Michael

---

From: [email-masked] (Bill Campbell)
Date: Wed, 7 Aug 1996 15:21:17 -0700 (PDT)

>
>On Thu, 8 Aug 1996, [ISO-8859-1] J=FCri Kaljundi wrote:
>
You can also add -u022 to the line in /etc/inetd.conf.

Bill
--
INTERNET:   [email-masked]  Bill Campbell; Celestial Systems, Inc.
UUCP:               camco!bill  PO Box 820; 2835 82nd Avenue S.E. S-100
FAX:            (206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

The very powerful and the very stupid have one thing in common.
Instead of altering their views to fit the facts, they alter the facts
to fit their views ... which can be very uncomfortable if you happen to
be one of the facts that needs altering.
                -- Doctor Who, "Face of Evil"

---

From: Jüri Kaljundi <[email-masked]>
Date: Thu, 8 Aug 1996 01:29:55 +0300 (EET DST)

> You can also add -u022 to the line in /etc/inetd.conf.

Well that is the problem, it does not seem to have any effect. Should I
have:
... root /usr/local/etc/ftpd -u077 in.ftpd
or
... root /usr/local/etc/ftpd in.ftpd -u077
or
... root /usr/local/etc/ftpd ftpd -u077

in inetd.conf?

Jüri Kaljundi
AS Stallion
[email-masked]

---

From: Emanuele Buttice <[email-masked]>
Date: Wed, 07 Aug 1996 16:44:46 -0700

Hi,

> Any way to change the umask to be 022 ?

I have done a lot of looking to find the answer to that question.
The -u option doesn't work, maybe with the latest ftp version 2.4.2 Beta
11. If that doesn't work then you will have to hack the ftp.c file and
hardcode the 022 umask.

I haven't done this myself but apparently it works :-} 

Hope this helps...

buck

---

From: [email-masked] (Bill Campbell)
Date: Wed, 7 Aug 1996 17:57:38 -0700 (PDT)

>11. If that doesn't work then you will have to hack the ftp.c file and
It works fine with our beta-11 here.  Here's our inetd.conf entry.
ftp stream tcp nowait root /usr/local/etc/tcpd /usr/local/etc/ftpd -alL -u022

We're using tcp_wrappers around wu-ftpd hence the slightly longish line.
I did have a problem with the length of the line running afoul of
SCO's inetd limits without squashing the options together.

Bill

---

From: "W. James Showalter" <[email-masked]>
Date: Thu, 8 Aug 1996 09:28:20 -0400 (EDT)

Michael,

You might want to try the undocumented switch -u on the command line.
This changes the default umask and avoids any code changes. 

Jim