Main Page

PCX Portal (0.3.00) - File Layout

The Website is layed out as follows:

It exists in /usr/share/pcx_portal/portal by default but can be customized based upon the server configuration you are running.  This is the default value used for the debs.

There are apache include config files in /etc/pcx_portal/apache/ that will setup the necessary apache directives to support RedHat and Debian's default web root's. Use them if setting the Portal up for the first time.

/portal      
   index.html   the main page that redirects to the cgi script.
   /cgi-bin    
    .htaccess turns on ExecCGI and mod_perl support.
    index.cgi the cgi script that actually runs the PCX Portal.
   /images   application specific images go here.
    .htaccess makes sure that ExecCGI is turned off, etc.
   /db_dump   where database dump files are placed when a companies database is deleted.  This allows us to know where to get them to recreate it in the future.
    .htaccess makes sure that no browser can view any files in here.
   /misc   miscellaneous storage for Portal Apps.
   /install   where database creation/update scripts/files should go.  Application specific.
    .htaccess makes sure that ExecCGI is turned off, etc.
    /Portal Portal specific db files.
         /colorSchemes Portal specific colorScheme files.
   /js   application specific JavaScript and HTML files go here.
    .htaccess makes sure that ExecCGI is turned off, etc.
    cookies.js JavaScript cookie library used by the Portal.
    browser_capabilities.js JavaScript browser capability detection library used by the Portal.
   /css   application specific CSS files go here.
    .htaccess makes sure that ExecCGI is turned off, etc.

When an application installs its support files into the PCX Portal (images, JavaScript files, database create scripts, etc.), they are placed in a directory called the application name in each of the relevant PCX Portal directories (images, js, css, install, db_dump, misc).  (Ex. Application = CompanyAdmin would have /images/CompanyAdmin, /install/CompanyAdmin, /css/CompanyAdmin and /js/CompanyAdmin created for it when the install.pl script is run during the installation phase, but only if the Application is using that feature.)

The PCX Portal Support scripts are layed out as follows:

They are put in /usr/lib/pcx_portal/ by the install.pl scripts and the PCX Portal and any of it's Applications are hard coded to look for them there.

PCX Portal Configuration Scripts

Database Manipulation Scripts

Application Support Scripts

Misc. Scripts

Other Directories

   /cron   Any installed Apps cron scripts go under here.
    /Portal Portal specific cron scripts.
      /hourly
      /daily
      /weekly
      /monthly
   /App   Apps support scripts go here.
    appinstall.pl installs the app into the Portal.
    setup.pl configures the apps XML config file.
    fix_permissions.pl Run by the Debian postinst script to fixup the permissions and ownership of the directories and files. Calls the Portals fix_permissions.pl script to make sure the Portal is locked down before locking down the Applications files and directories. New in 0.3.00!

The PCX Portal Application installation files are layed out as follows:

install/     The directory where all non Portal::App module files that the application needs put into the PCX Portal come from.
  config/   (Required)
    App.xml (Required) The config file that is maintained by setup.pl and available as Portal::App::Data::Config.
  files/   (Required) - holds all the customized content the application needs.
    images/ (Required) - holds all images the application needs.  The only thing really required is the icon image the application will use.
    js/ (Optional) - holds any JavaScript or HTML files the application needs.
    css/ (Optional) - holds any CSS files the application needs.
    install/ (Optional) - holds any database create/update files the application needs.
    colorSchemes/ (Optional) - holds any colorScheme definition files the application needs.
    cron/ (Optional) - holds any cron scripts.
      /hourly
      /daily
      /weekly
      /monthly
    misc/ (Optional) - Miscellaneous storage for the App.
  scripts/   (Required) - The administration scripts for registering / configuring the application in the Portal go here.
    setup.pl (Required) - Maintains the App.xml file in /etc/pcx_portal/.
    appinstall.pl (Required) - Registers the application with the Portal.  Calls /usr/lib/pcx_portal/appinstall.pl.
    fix_permissions.pl (Required) - Run by the Debian postinst script to fixup the permissions and ownership of the directories and files. Calls /usr/lib/pcx_portal/fix_permissions.pl script to make sure the Portal is locked down before locking down the Applications files and directories. New in 0.3.00!
  install.pl   (Required) - Actually puts the application files into place that are under files and scripts.  Calls /usr/lib/pcx_portal/install_app.pl.

The PCX Portal config files go in /etc/pcx_portal/:

Permissions:

All directories and files are to be owned by the webUser and webGroup config values.
/etc/pcx_portal is 0700
/etc/pcx_portal/*.xml is 0600
/usr/lib/pcx_portal is 0755 - this allows for easier package management as the scripts are mode 0755
/usr/lib/pcx_portal/{cron,App} is 0700
/usr/share/pcx_portal is 0700
The js,cgi-bin,css,misc,install,db_dump directories is 0700 in the web tree
The Application directories under db_dump are 0700

SourceForge Logo