Setting the FTP directory

Specific settings must be set in the common.properties and docstore_mount.xml files to make the FTP directory work in the docstore.

Procedure

  1. Create the directories and a sample file in IBM® Product Master.
    For example /ftp/test/trigo/sample.txt. Set these directories to allow read and write privilege for Product Master users.
  2. Stop Product Master.
  3. In the common.properties file, make the following changes
    1. Set the ftp_root_dir parameter, specifying a slash at the end of an absolute directory.
      For example:
      …….
      # base directory for each supplier (relative to ${TOP}) MUST START with public_html!!!!!!!!!
      supplier_base_dir=/public_html/suppliers/

      # Can multiple ctg files (for image/binary attributes) exist with the same name?
      # If false, will store files in ctg_files within the supplier base
      # If true, will store files in subdirectories within ctg_files with timestamps for names
      allow_multiple_files_with_same_name=false

      # root directory for ftp
      # (must end with a "/")
      #ftp_root_dir=/u01/ftp/
      ftp_root_dir=/ftp/test/
      ………
      Product Master appends the company name "trigo" for this example, assuming that your company is “trigo”. Make sure that this directory exists and that files exist in the directory.
      Note: Files that are stored in the /ftp/test/COMPANY_CODE/files directory shows up in the FTP section of the docstore. If the files do not show up in the docstore, use the touch command to change the dates on the files. Also, make sure that the files have the correct permissions. Files that are stored in the /ftp/test directory does not show up in the docstore, as it looks only in the ftp/test/COMPANY_CODE/ directories.
    2. Set the enable_mountmgr property to true:
      ....
      other docstore specific parameters in austin.properties
      # mount mgr daemon info
      mountmgr_daemon_sleep_time=120000

      #
      # MountMgr is only useful if an external process adds/deletes files
      to file system directories mounted in the docstore
      # values: true/false
      #
      enable_mountmgr=true

      ....
  4. In the docstore_mount.xml file, make sure that you specify the real path for the FTP doc_path parameter and set the inbound parameter to yes:
    <?xml version="1.0"?>
    <mnts>
    <mnt doc_path="/public_html/" real_path="$supplier_base_dir/" inbound="yes"
    />
    <mnt doc_path="/ftp/" real_path="$supplier_ftp_dir/" inbound="yes" />
    </mnts>
    If inbound is set to yes, file system is replicated to the docstore.
    Note: The setting of the parameter ftp_root_dir in the common.properties file is copied onto the parameter supplier_ftp_dir in the docstore_mount.xml file. Therefore, they have the same value.
  5. Start Product Master. To test the docstore mount manager for immediate results, you can run the following command:
    $JAVA_RT com/ibm/ccd/docstore/common/MountMgr -op=sync -company_code=trigo
    Where company_code is set to your company, in this case "trigo".