Endpoint Encryption

 View Only
  • 1.  PGP Command Line automated through IIS7

    Posted Jul 07, 2011 11:18 AM

    I am currently working on a product that needs to use some specific PGP commands.  The code is running on Windows server 2008 using IIS7.  When the user chooses a certain action, I need to encrypt or decrypt a file before processing it.

    The problem that I am having is that when I logon to the server, I can run any pgp command directly through command line and it works, but when I have the code call PGP, I get the following error:

    "Error: no personal documents directory found"

    Is it not possible to automate PGP on a server that is running an application?  If it is possible, what am I doing wrong that is stopping PGP from working?

     

    Thanks in advance for any help you can give me!



  • 2.  RE: PGP Command Line automated through IIS7

    Posted Jul 07, 2011 12:55 PM

    PGP Command Line can work well in such environments. It seems as if you are running the web service under a user account that does not have a "My Documents" folders. PGP Command Line tries to create (empty) keyring files on the first start in the "My Documents/PGP" folder if none exist. You need those keyring files to store key material. Since the user you are running command line with does not have such a folder, you need to specify the keyring files on the command line manually (--private-keyring --public-keyring). Or you use the --home-dir directive to specify where PGP Command Line should look for a prefs file or keyring files.

     

    regards
    .andi



  • 3.  RE: PGP Command Line automated through IIS7

    Posted Jul 12, 2011 06:29 PM

    Andi,

    Thanks for the help.  I put --home-dir and specified the path at the end of my call to PGP.  Now if I try to do a command like --version, it works.  But if I try to encrypt something, I get an error of "The system cannot find the file specified." I don't know if this is a PGP error or system error.  The file that I am trying to encrypt is there and has its full path specified, so I don't know what is going on with it.  Do you have any idea?



  • 4.  RE: PGP Command Line automated through IIS7

    Posted Nov 29, 2011 09:54 AM

    If the path to the file has spaces, use quotes  on the "PATH".

    Also check all the encrypt command parameters are there, check the manual:

    http://www.symantec.com/business/support/resources/sites/BUSINESS/content/live/DOCUMENTATION/4000/DOC4570/en_US/pgpCmdline_1020_usersguide_en.pdf