Article View: comp.sys.ibm.pc.misc
Article #4192Re: UUEncode question
From: Kartik Subbarao
Date: Thu, 25 Oct 1990 12:25
Date: Thu, 25 Oct 1990 12:25
40 lines
2245 bytes
2245 bytes
In article <Oct.24.13.26.49.1990.4850@pilot.njin.net> lodzins@pilot.njin.net (Dean Lodzinski) writes:
>
>I have a quick question. At the beginning of a UUencoded file there
>is a line that says
>begin <mode> <filename>
>What is the function of the mode number? Is it used for a checksum of
>some type? I have looked at the source of a version of uuencode and
>it makes calls to a function called umask and fstat. I know fstat
>returns information about a file, like file size, type, etc. It also
>returns mode. The struct stat is defined in stat.h. On the Prime
>system I am trying to modify the code on, the struct stat in stat.h
>doesn't return mode (or at least I can't find it in the struct stat.
>So, if someone could explain what uuencode does with the <mode> number
>and how uudecode uses it etc, it might help me in the conversion.
On a UN*X type system, the mode number denotes the permission in octal,
where 1 = execute, 2 = write, 4 = read. And the three numbers are for
user, group and other. So a permission of 644 means read & write (4 + 2)
for the user, and write (2) for both the group and everybody else. Of course
this means absolutely nothing in a single user MS-DOS system, where there are
no "group" and "other".
-Kartik
>--
>
>Dean Lodzinski DEAN_L@TURBO.Kean.edu, lodzins@pilot.njin.net
>47 Mercury Circle csra19@TURBO.Kean.edu or D.LODZINSKI on GEnie
>South Amboy, NJ 08879 Dean Lodzinski on Hologram Inc., FNET Node 133,
>USA at 201/727-1914 (1200/2400/9600)
(I need a new .signature -- any suggestions?)
subbarao@{phoenix or gauguin}.Princeton.EDU -|Internet
kartik@silvertone.Princeton.EDU (NeXT mail) -|
SUBBARAO@PUCC.BITNET - Bitnet
Technical Details
Message-ID:
<3568@idunno.Princeton.EDU>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!decwrl!csus.edu!beach!nic.csu.net!usc!zaphod.mps.ohio-state.edu!uwm.edu!rutgers!njin!princeton!phoenix!subbaraoReferences:
<Oct.24.13.26.49.1990.4850@pilot.njin.net>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!decwrl!csus.edu!beach!nic.csu.net!usc!zaphod.mps.ohio-state.edu!uwm.edu!rutgers!njin!princeton!phoenix!subbarao From: subbarao@phoenix.Princeton.EDU (Kartik Subbarao) Newsgroups: comp.sys.ibm.pc.misc Subject: Re: UUEncode question Keywords: UUEncode,UUDecode Message-ID: <3568@idunno.Princeton.EDU> Date: 25 Oct 90 12:25:39 GMT References: <Oct.24.13.26.49.1990.4850@pilot.njin.net> Sender: news@idunno.Princeton.EDU Lines: 40