Function __global->scan_permissions

Definitions

sources/file_permissions_check.php

  • Scan permissions. Software-specific wrapper for the CMSPermissionsScanner* classes.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$live_output boolean No No False N/A N/A Whether to produce live output of issues
$live_commands boolean No No False N/A N/A Whether to run commands live
$web_username ?string No No Null N/A N/A Username or User ID (null: try and auto-detect, failing that assume suEXEC-style)
$has_ftp_loopback_for_write ?boolean No No Null N/A N/A Whether the system has the potential to 'get' write access on non-suEXEC-style servers by (for example) looping through FTP (null: default / auto-detect if possible)
$minimum_level integer No No 3 N/A N/A Minimum RESULT_TYPE_* level

Returns

  • A tuple: Messages to show, Commands to run, Paths with issues, Whether any issues were found
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Scan permissions. Software-specific wrapper for the CMSPermissionsScanner* classes.
 *
 * @param  boolean $live_output Whether to produce live output of issues
 * @param  boolean $live_commands Whether to run commands live
 * @param  ?string $web_username Username or User ID (null: try and auto-detect, failing that assume suEXEC-style)
 * @param  ?boolean $has_ftp_loopback_for_write Whether the system has the potential to 'get' write access on non-suEXEC-style servers by (for example) looping through FTP (null: default / auto-detect if possible)
 * @param  integer $minimum_level Minimum RESULT_TYPE_* level
 * @return array A tuple: Messages to show, Commands to run, Paths with issues, Whether any issues were found
 */

function scan_permissions(bool $live_output = false, bool $live_commands = false, ?string $web_username = null, ?bool $has_ftp_loopback_for_write = null, int $minimum_level = 3) : array