🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.security.misc
Article #7

Re: default umask settings when ftp'ing a file

#7
From: Andreas Karrer
Date: Tue, 27 Oct 1992 20:12
36 lines
1885 bytes
edelheit@smiley.mitre.org (Jeff Edelheit) writes:

>I've been doing some poking around and have found a problem that I
>can't quite figure out how to fix.  I have a 027 umask set in my
>.cshrc, so any files I create have a permission set of rw-r-----.
>However, if I ftp a file, the permission set on the ftp'ed file
>is rw-rw-rw-.  What and where do I have to set something so that the
>ftp'ed file comes up with the same permission set as a file I create
>from a cshell?

With "put", your .cshrc or .login or .profile is never consulted.
ftpd, started as root, changes its UID to yours but uses
the umask inherited from inetd.

tell your system administrator to put a line
	umask 022
or
	umask 027
or so at the top of /etc/rc (or whatever they call it). reboot,
or kill and restart inetd after setting the desired umask.

This, of course, works only on a system wide basis. For per-user
umasks, ftpd would have to understand the syntax of any .shell-rc
file a potential ftp user might have -- non-trivial, considering the
current proliferation of shells.

This works (with umask 022; umask 027 not tested) under
Ultrix 4.* and under SunOS 4.1.*.

You'd be astonished how many files on a typical system are world-writeable.
the gcc-2.2.2 distribution is such an offender.


+-----------
  Andi Karrer, Communication Systems, ETH Zuerich, Switzerland
  karrer@bernina.ethz.ch    - Objects in mirror are closer than they appear
Technical Details
Message-ID: <1992Oct27.201224.2899@bernina.ethz.ch>
Path: arc1-ca.pugleaf.net!sparky!uunet!news.univie.ac.at!chx400!bernina!karrer
References: <1992Oct27.150453.507@linus.mitre.org>

Show Full Headers
Complete Article Headers
Newsgroups: comp.security.misc
Path: arc1-ca.pugleaf.net!sparky!uunet!news.univie.ac.at!chx400!bernina!karrer
From: karrer@bernina.ethz.ch (Andreas Karrer)
Subject: Re: default umask settings when ftp'ing a file
Message-ID: <1992Oct27.201224.2899@bernina.ethz.ch>
Organization: Swiss Federal Institute of Technology (ETH), Zurich, CH
References: <1992Oct27.150453.507@linus.mitre.org>
Date: Tue, 27 Oct 1992 20:12:24 GMT
Lines: 36