[comp.sys.ti.explorer] unix file protection

jwz@spice.cs.cmu.edu (Jamie Zawinski) (08/26/89)

When an Explorer creates a file on a Unix machine, the file is globally
readable and writable.  Has anyone hacked things so that one can specify 
the default protections?  

	-- Jamie

acuff@SUMEX-AIM.STANFORD.EDU (Richard Acuff) (08/28/89)

> When an Explorer creates a file on a Unix machine, the file is globally
> readable and writable.  Has anyone hacked things so that one can specify 
> the default protections?  

This is usually due to FTP being used to write files.  As far as I've been
able to tell Unix's FTP makes up its own mind about what protections should be
and there's no way the Explorer can set protection via FTP.  The problem would
have to be fixed by hacking the Unix FTP server in some way (possibly with
some Explorer side changes), and thus the changes would be specific to a
particular location.  However, if anyone does them, I'd be interested.

        -- Rich

-------

bzs@CS.BU.EDU (Barry Shein) (08/29/89)

The newest (4.3+) FTP daemon takes the command:

	ftp> quote SITE UMASK 022

or whatever value, it says which bits are to be turned OFF, thus a
UMASK of 022 means no WRITE to GROUP or OTHER (but OWNER has WRITE.)
Similarly, 002 means allow OWNER and GROUP WRITE but not OTHER, 777
would turn off all meaningful bits allowing no one, including the
owner, access.) The three bits are 1=EXECUTE, 2=WRITE, 4=READ, you add
them together for each of the three groups OWNER, GROUP, OTHER.

Hmm, well, it's in the UNIX manual if that's not perfectly lucid
(oops, wrong list.)

Use 022, it's safe enough.

The full sources for the ftp daemon which implements this are
available for public distribution (but not domain) in various places,
I don't remember where off hand, probably BERKELEY.EDU or
UCBARPA.BERKELEY.EDU .

	-Barry Shein

Software Tool & Die, Purveyors to the Trade
1330 Beacon Street, Brookline, MA 02146, (617) 739-0202
Internet: bzs@skuld.std.com
UUCP:     encore!xylogics!skuld!bzs or uunet!skuld!bzs