Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!ub!uhura.cc.rochester.edu!rochester!cornell!doron From: doron@chanter.cs.cornell.edu (Leor Doron) Newsgroups: comp.binaries.ibm.pc.d Subject: Re: Seeking "smarter" UUDECODE.C type utility Message-ID: <51502@cornell.UUCP> Date: 2 Feb 91 00:49:40 GMT References: <1991Jan22.020001.15847@ashtate> <1991Feb1.070051.26557@tygra.UUCP> Sender: nobody@cornell.UUCP Reply-To: doron@cs.cornell.edu (Leor Doron) Organization: Cornell Univ. CS Dept, Ithaca NY Lines: 47 In article <1991Feb1.070051.26557@tygra.UUCP> dave@tygra.UUCP (David Conrad) writes: >In article <1991Jan22.020001.15847@ashtate> tomr@ashtate (Tom Rombouts) writes: >> 3. Ignore the "starting with M" rule on the final >> line, which I belive is indicated after "begin" how many >> encoded lines there are. >> > >The number after "begin" does NOT indicate how many encoded lines there >are, but there will probably be eighteen other posts telling what it >*does* mean. It is an invariant "644" in the three versions of uuencode >I have, and I've only run into one uuencoded file with a different number >ever (it was "600"). I think it's a version number. > >>Tom Rombouts Torrance 'Tater tomr@ashtate.A-T.com V:(213)538-7108 > >David Conrad This is the first (to my knowledge) of the eighteen posts correcting you ;-). The number after 'begin' indicates the Unix permissions code of the original file. It is included so that the recreated file will retain the permissions of the original. Such permissions are necessary for (half-)secure multiuser systems. The permissions code is in octal (yes, octal!) notation. The binary translation of each digit is interpreted as 'rwx': read, write, and execute access. The three digits refer to 'ugo': user who owns the file, group and other. Thus, 640 is 110 100 000, which means the user (owner) can read and write to the file; members of the group assigned to the file can only read it; and everyone else can't do a thing with it. A listing of the file in long format on unix would look like this: -rw-r----- 1 doron dgroup 4 Feb 1 19:34 foo Non-Unix UUENCODEs have permissions hard-coded because none are available from the operating system, so a reasonable choice is made for compatibility. 644 keeps your file from being tampered with, while 600 keeps it private. Naturally, a user can manually change the permissions on the file, if he/she desires/remembers to do so -- these are just relatively safe initial values. Hope this helped, --Lee ==doron@cs.cornell.edu========================================================= = ".Sig! .Sig a .sog! .Sig it loud; .sig it .strog!" = ========= -- Karen Carpenter with a head cold =================================