You are here

function _hosting_config_path_requirements in Hosting 5

File

web_server/hosting_web_server.module, line 25
Web server node type is defined here.

Code

function _hosting_config_path_requirements() {
  $username = HOSTING_DEFAULT_SCRIPT_USER;
  $group = HOSTING_DEFAULT_WEB_GROUP;
  $vhost_path = HOSTING_DEFAULT_CONFIG_PATH;
  $mkdir_cmd['@vhost_path'] = $vhost_path;
  $mkdir_cmd['@mkdir_cmd'] = <<<EOF
    mkdir -p {<span class="php-variable">$vhost_path</span>}
    chown {<span class="php-variable">$username</span>}:{<span class="php-variable">$username</span>} {<span class="php-variable">$vhost_path</span>}
    chmod 0700 {<span class="php-variable">$vhost_path</span>}
EOF;
  $help['title'] = t('Write access to a directory to store configuration information');
  $help['summary'] = t('The Provision framework takes special care to make sure that the file permissions of the
                       hosted sites are always as safe as can be, especially to make sure that the web server does
                       not have the ability to modify the code of the site, therefore this information is required
                       to assure that safety while keeping the sites accessible.
                       The recommended path is directly above your platform path, but it can be anywhere.');
  $help['configuration'][] = t('Based on your server configuration we have determined that your path should be <code>@vhost_path</code>.', $mkdir_cmd);
  $help['configuration'][] = t(' please enter the following commands : <pre>@mkdir_cmd</pre>', $mkdir_cmd);
  return $help;
}