Function CMSPermissionsScannerWindows->generate_chmod_command

Definitions

sources/file_permissions_check.php

  • Generate a chmod command from differential permissions.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$path PATH No No required parameter N/A N/A The path the command is for
$sid string No No required parameter N/A N/A The user to apply to
$perms_involved array No No required parameter N/A N/A Permissions to set
$operator string No No required parameter - + N/A Change operator
$reset boolean No No False N/A N/A Reset permissions for the SID

Returns

  • Chmod command
  • Type: string
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Generate a chmod command from differential permissions.
 *
 * @param  PATH $path The path the command is for
 * @param  string $sid The user to apply to
 * @param  array $perms_involved Permissions to set
 * @param  string $operator Change operator
 * @set - +
 * @param  boolean $reset Reset permissions for the SID
 * @return string Chmod command
 */

public function generate_chmod_command(string $path, string $sid, array $perms_involved, string $operator, bool $reset = false) : string