Endpoint Encryption

 View Only
  • 1.  PGP Encryption failed. Exit code was 162.

    Posted Jan 31, 2011 03:52 AM

    We're getting a "PGP Encryption failed. Exit code was 162." Error code 162 is "Complete failure during an encode."  Our thinking is around user permissions since users with elevated privileges don't get this error and the encryption works fine.  So what I'm really after is an explanation of what the error means and what precisely we should be looking at in order to resolve the issue.

    Can anybody help?



  • 2.  RE: PGP Encryption failed. Exit code was 162.

    Posted Jan 31, 2011 07:30 AM


  • 3.  RE: PGP Encryption failed. Exit code was 162.

    Posted Jan 31, 2011 09:27 AM

    Hi Tom,

    It doesnt help.  I now get 9000:invalid flag "--temp-dir". My PGP Command Line version is 8.5 and that flag is not supported in that version.

    Any other ideas?



  • 4.  RE: PGP Encryption failed. Exit code was 162.

    Posted Feb 01, 2011 11:26 AM

    Do you have read and write access to the current working directory?

    Can you re-run your command with the "--debug --verbose" options, and post the result?

    Thanks.



  • 5.  RE: PGP Encryption failed. Exit code was 162.

    Posted Feb 03, 2011 12:22 PM

    Hi David,

    Here are the results:

     C:\PGP\pubring.pkr:open keyrings (1006:public keyring)
    C:\PGP\secring.skr:open keyrings (1007:private keyring)
    0x66666666:encrypt (1030:key added to recipient list)
    0xFFFFFFFF:encrypt (1050:key added as signer)
    Encoding \\SQLSTAGE\MRIAPPS\BOA_PAYMODE\OUTBOX\PGP\temp.csv...
    \\SQLSTAGE\MRIAPPS\BOA_PAYMODE\OUTBOX\PGP\temp.csv:encrypt (3048:data encrypted with cipher AES256)
    \\SQLSTAGE\MRIAPPS\BOA_PAYMODE\OUTBOX\PGP\temp.csv:encrypt (3124:permission denied)
    Encode complete
     Our error 162
    Press any key to continue . . .

    Here's an example of what it looks like when it runs properly:

     C:\PGP\pubring.pkr:open keyrings (1006:public keyring)
    C:\PGP\secring.skr:open keyrings (1007:private keyring)
    0x66666666:encrypt (1030:key added to recipient list)
    0xFFFFFFFF:encrypt (1050:key added as signer)
    Encoding \\SQLSTAGE\MRIAPPS\BOA_PAYMODE\OUTBOX\PGP\tempinput.csv...
    \\SQLSTAGE\MRIAPPS\BOA_PAYMODE\OUTBOX\PGP\tempinput.csv:encrypt (3048:data encrypted with cipher AES256)
    Encoding \\SQLSTAGE\MRIAPPS\BOA_PAYMODE\OUTBOX\PGP\tempinput.csv... 100% (4.7KB)
    Encode complete
    Copying output to \\SQLSTAGE\MRIAPPS\BOA_PAYMODE\OUTBOX\PGP\tempoutput.pgp... 100% (6.3KB)
    Wiping pgp00000.tmp...
    Wiping pgp00000.tmp (stream 1)...
    Wiping file pgp00000.tmp... 100%
    Wipe (stream 1) done
    Wipe done
    pgp00000.tmp:encrypt (0:file wiped successfully)
    \\SQLSTAGE\MRIAPPS\BOA_PAYMODE\OUTBOX\PGP\tempinput.csv:encrypt (0:output file \\SQLSTAGE\MRIAPPS\BOA_PAYMODE\OUTBOX\PGP
    \tempoutput.pgp)
    Press any key to continue . . . 


  • 6.  RE: PGP Encryption failed. Exit code was 162.

    Posted Feb 03, 2011 03:05 PM

    The successful run shows this:

    Encoding \\SQLSTAGE\MRIAPPS\BOA_PAYMODE\OUTBOX\PGP\tempinput.csv... 100% (4.7KB)
    Encode complete
    

    While the unsuccessful one shows:

     Encoding \\SQLSTAGE\MRIAPPS\BOA_PAYMODE\OUTBOX\PGP\temp.csv...
    \\SQLSTAGE\MRIAPPS\BOA_PAYMODE\OUTBOX\PGP\temp.csv:encrypt (3048:data encrypted with cipher AES256)
    \\SQLSTAGE\MRIAPPS\BOA_PAYMODE\OUTBOX\PGP\temp.csv:encrypt (3124:permission denied)
    

    Do the users who get the error have write permissions to in \\SQLSTAGE\MRIAPPS\BOA_PAYMODE\OUTBOX\PGP\? Have the permissions on the folder changed recently or has the group membership of the users changed?



  • 7.  RE: PGP Encryption failed. Exit code was 162.
    Best Answer

    Posted Feb 04, 2011 04:39 AM

    Hi David,

    Yes, we noticed that, and the users do have permissions to that folder.  However, we eventually figured out where the problem was.  The issue was that the users needed read/write access to the working directory.

    Let me explain. What was missing from my screenshots was:

     C:\Program Files\MRI Real Estate Solutions>pgp.exe --e "\\SQLSTAGE\MRIAPPS\BOA_PAYMODE\OUTBOX\PGP\temp.csv" -r 0x66666666 --verbose --debug --compress --output "\\SQLSTAGE\MRIAPPS\BOA_PAYMODE\OUTBOX\PGP\temp.pgp" --armor --sign --signer 0xFFFFFFFF --passphrase 123456 

    That was the command that fired the PGP.  The users needed read/write access to C:\Program Files\MRI Real Estate Solutions\ as well as the \\SQLSTAGE\...\PGP\ folder.  For some reason, PGP 8.5 needs read/write access to the working directory. So we solved the problem by changing the working directory to one that the user had access to.



  • 8.  RE: PGP Encryption failed. Exit code was 162.

    Posted Feb 04, 2011 10:01 AM

    I believe that PGP 8.5 wrote its temporary files to the current working directory.

    I'm glad you found your solution.