[comp.unix.questions] uudecode - permission denied

peter@sundist.essex.ac.uk (Allott P) (07/05/89)

Can someone please explain what I/we are doing wrong?
I find that to get uudecode to work, the file that I expect it
to create must already exist and have the 020 bit set in its mode.
Or uudecod states "file: Permission denied"

I think we have a normal issue of SUN-OS 3.4 (I think I've also seen it on
4.0) - I can not believe that this is correct behaviour.

ked@garnet.berkeley.edu (Earl H. Kinmonth) (07/06/89)

In article <1250@servax0.essex.ac.uk> peter@essex.ac.uk writes:
>Can someone please explain what I/we are doing wrong?
>I find that to get uudecode to work, the file that I expect it
>to create must already exist and have the 020 bit set in its mode.
>Or uudecod states "file: Permission denied"
>
>I think we have a normal issue of SUN-OS 3.4 (I think I've also seen it on
>4.0) - I can not believe that this is correct behaviour.

Whether it is correct or not, that's the way it works on the SUN I use.
Fortunately, the uuencode/uudecode source code is readily available
without this particular "feature" of the SUN implementation.  Get a copy
of the code, compile it, and place it in a directory where it will be
found ahead of the system uuencode/decode.

Earl H. Kinmonth
History Department
University of California, Davis
916-752-1636 (voice, fax [2300-0800 PDT])
916-752-0776 secretary

(bitnet) ehkinmonth@ucdavis.edu
(uucp) ucbvax!ucdavis!ucdked!cck
(telnet or 916-752-7920) cc-dnet.ucdavis.edu [128.120.2.251]
	request ucdked, login as guest,
	no password

mvp@v7fs1.UUCP (Mike Van Pelt) (07/06/89)

In article <1250@servax0.essex.ac.uk> peter@essex.ac.uk writes:
>Can someone please explain what I/we are doing wrong?
>I find that to get uudecode to work, the file that I expect it
>to create must already exist and have the 020 bit set in its mode.
>Or uudecod states "file: Permission denied"

>I think we have a normal issue of SUN-OS 3.4 (I think I've also seen it on
>4.0) - I can not believe that this is correct behaviour.

Believe it.  Uudecode is su uucp, so unless uucp can write to the
destination, you'll get the "permission denied" nastygram.

You and I aren't the only people who consider this to be
egregiously brain-damaged behavior.  That's why I use atob and
btoa whenever possible.  They give a smaller output file
since they use both upper and lower case, and they include a
checksum of the encoded file.

-- 
Mike Van Pelt                          Here lies a Technophobe,
Headland Technology/Video 7               No whimper, no blast.
...ames!vsi1!v7fs1!mvp                 His life's goal accomplished,
                                          Zero risk at last.

emv@math.lsa.umich.edu (Edward Vielmetti) (07/06/89)

In article <1250@servax0.essex.ac.uk> peter@essex.ac.uk writes:
>Can someone please explain what I/we are doing wrong?
>I find that to get uudecode to work, the file that I expect it
>to create must already exist and have the 020 bit set in its mode.
>Or uudecod states "file: Permission denied"

This bit here a few days ago.

uu*code ship as setuid to uucp, which is why you get the Permission
denied message.  chmod the thing so that it's normal and you'll be
all set.

Note that there has been a bit of work on uuencode/uudecode (mostly
on the part of people on micros and on bitnet) to cope with file
mangling a bit more gracefully.  I don't have pointers to the
latest and greatest, tho.

--Ed

malloy@nprdc.arpa (Sean Malloy) (07/22/89)

In article <26040@agate.BERKELEY.EDU> ked@garnet.berkeley.edu (Earl H. Kinmonth) writes:
>In article <1250@servax0.essex.ac.uk> peter@essex.ac.uk writes:
>>Can someone please explain what I/we are doing wrong?
>>I find that to get uudecode to work, the file that I expect it
>>to create must already exist and have the 020 bit set in its mode.
>>Or uudecod states "file: Permission denied"

>Whether it is correct or not, that's the way it works on the SUN I use.
>Fortunately, the uuencode/uudecode source code is readily available
>without this particular "feature" of the SUN implementation.  Get a copy
>of the code, compile it, and place it in a directory where it will be
>found ahead of the system uuencode/decode.

I had the same problem on our Suns, and after a little looking around,
discovered that uudecode is setUID to 'uucp' -- which can't write into
your directories to create the uudecoded file, so you get the file
create failure.

What I wound up doing was making one directory where all the uuencoded
files got stored, which had its permission value set to 777. Uudecode
is perfectly happy writing files into it, and aside from having the
file owned by uucp, everything is fine.


 Sean Malloy					| "The proton absorbs a photon
 Navy Personnel Research & Development Center	| and emits two morons, a
 San Diego, CA 92152-6800			| lepton, a boson, and a
 malloy@nprdc.navy.mil				| boson's mate. Why did I ever
						| take high-energy physics?"