eXtropia: the open web technology company
Technology | Support | Tutorials | Development | About Us | Users | Contact Us
Development resources
 ::   WebWare 2.1 (Perl)
 ::   WebWare 2.0 (Java)
 ::   Cool hacks
radical hacks
PGP5.x for Linux and Selena Sol's Webstore  

The following are the steps I took (with Gunther's guidance) to get Selena Sol's Webstore working with PGP5.x for Linux. I make no guarantees, though I'm fairly sure these are correct as I have done it twice now. The following assumes y ou have PGP5 compiled and installed correctly on your Linux Server AND your webstore works perfectly (only the data is not encrypted). Please be sure these two things are true before continuing.

If you find a step missing, please let me know so that I can update it! ()

After the above two things are satisfied, do the following steps:

  1. First you need to create your public/private keys. Login to your linux account and type:

      pgpk -g

    Then just answer the prompts to complete creation of your keys. Make note of your userid as you will need it to complete the setup. Usually in the format:

      name <email@domain.com>

    DO NOT FORGET YOUR PASS PHRASE!! If you do, you will not be able to decrypt incoming messages.

  2. Edit the pgp.cfg file that is created in the ~/.pgp directory to reflect the userid you listed in the step above (line 10)

  3. Copy the following files from the ~/.pgp directory into your Pgpfiles directory (usually ~/Web_store/Pgpfiles):

    • pgp.cfg
    • pubring.back
    • pubring.pkr
    • randseed.bin

  4. Change the permissions on those four files to rw-r--r-- by going to the Pgpfiles directory and typing:

      chmod 644 *

  5. Download the new pgp-lib5.pl file.

  6. Upload to your linux server and put into the Library directory of the webstore. I would backup the old pgp-lib.pl file:

      cp pgp-lib.pl old-pgp-lib.pl

    and then cp the new one into place:

      cp pgp-lib5.pl pgp-lib.pl

  7. Edit the pgp-lib.pl file:

      On line number 47, replace:

        Gunther Birznieks <gunther\@extropia.com>

      with your own userid (the one you typed in when you created your keys... be sure to keep the \ in front of the @ sign even though you didn't type that in when creating your keys).

      On line number 48, replace:


      with the full path to your Pgpfiles directory (you might be able to get it to work another way, this is just the way I did it). For example:


  8. Save and close that file.

  9. Open your setup file (I used web_store.setup.frames), and change the:

      $sc_use_pgp = "no";

    to read:

      $sc_use_pgp = "yes";

  10. That's it... now place an order and you should get an encrypted email. :) Decrypt THAT and you have the order you just placed!

Written by Tina Tindall,
added some comments:
It took me days to work out why I couldnt get PG
to work.

It was a simply chown on the Pgpfiles which need
to be set to whatever the server the server runs as

In our case

chown nobody *.*


chgrp 9999 *.*

Worked a treat after that.