diff --git a/commands/core/core.drush.inc b/commands/core/core.drush.inc index d702205..75cbe9d 100644 --- a/commands/core/core.drush.inc +++ b/commands/core/core.drush.inc @@ -302,8 +302,8 @@ function core_drush_command() { 'drush perms www-admin:www-data www-data --strict' => 'Set permissions with "www-admin" as the user owner and "www-data" as the group owner of the code files, and "www-data" as both the owner and group of "Files" and "Private". Other users not in the www-data group will not be able to read any files. Suitable for use in a typical site running on a shared server. The web server user / php process MUST be a member of the group "www-data".', 'drush perms bob:devs www-data:devs --lax' => 'Set permissions with "bob" as the user owner and "devs" as the group owner. "Files" and "Private" will be world-writable. Members of group "devs" will be able to write to all files (except settings.php). Other files will be world-readable. Suitable for use in a typical development environment. The web server user / php process SHOULD NOT be a member of the group "devs".', 'drush perms bob www-data' => 'Set permissions with "bob" as the user and group owner of code files. Data files will be owned by "www-data". Other files will be world-readable.', - 'sudo chown -R www-admin . && drush perms --skip-set-owner www-data' => 'Only run unpriviledged commands from Drush.', - 'drush perms --sudo=all www-admin:www-data' => 'Instruct Drush to call sudo before executing priviledged commands. n.b. This is preferable to using `sudo drush ...`, which gives all enabled contrib modules an opportunity to run arbitrary code as the superuser.', + 'sudo chown -R www-admin . && drush perms --skip-set-owner www-data' => 'Only run unprivileged commands from Drush.', + 'drush perms --sudo=all www-admin:www-data' => 'Instruct Drush to call sudo before executing privileged commands. n.b. This is preferable to using `sudo drush ...`, which gives all enabled contrib modules an opportunity to run arbitrary code as the superuser.', 'drush perms --pipe www-admin:www-data > perms.sh && chmod +x perms.sh && sudo ./perms.sh' => 'Generate a script and run it via sudo. Even more secure than the --sudo option.', ), 'arguments' => array( @@ -380,7 +380,7 @@ function core_drush_command() { 'not-group-writable' => 'Changes the defaults for --data-dirs and --data-files to be the same as the defaults for --code-dirs and --code-files, respectively.', 'lax' => 'Make writable files writable by any user. Optional; synonym for --code-files=0664 --code-dirs=0775 --data-files=0666 --data-dirs=0777 --doc-files=664.', 'strict' => 'Optional; synonym for --not-world-readable --not-group-writable. Overrides --lax.', - 'skip-set-owner' => 'Presumes that the owner of the files is already correct, and skips setting it. Allows execution by unpriviledged user.', + 'skip-set-owner' => 'Presumes that the owner of the files is already correct, and skips setting it. Allows execution by unprivileged user.', 'sudo' => array( 'description' => 'Call sudo before commands that set file ownership. If --sudo=all is specified, then sudo is also used before commands that set file permissions.', 'value' => 'optional', diff --git a/commands/core/permissions.core.inc b/commands/core/permissions.core.inc index a678983..dea74fc 100644 --- a/commands/core/permissions.core.inc +++ b/commands/core/permissions.core.inc @@ -332,8 +332,8 @@ function drush_core_permissions($code_files_owner_group = '', $data_files_owner_ if ($sudo) { foreach($command_list as $key => $command_record) { // If --sudo=all was specified, then add a 'sudo' to every command. - // Otherwise, only add 'sudo' to commands flagged as '#priviledged' - if (is_array($command_record) && isset($command_record['!command']) && (($sudo === 'all') || (array_key_exists('#priviledged', $command_record)))) { + // Otherwise, only add 'sudo' to commands flagged as '#privileged' + if (is_array($command_record) && isset($command_record['!command']) && (($sudo === 'all') || (array_key_exists('#privileged', $command_record)))) { $command_list[$key]['!command']['tmpl'] = 'sudo ' . $command_list[$key]['!command']['tmpl']; } } @@ -426,7 +426,7 @@ function _drush_perms_build_chown_command($base_dir, $owner, $group) { $result = array(); $chmod_template = "!cmd ^arg --"; $test_owner_template = "\\( \\! -group ^group -o \\! -user ^owner \\)"; - $priviledged = TRUE; + $privileged = TRUE; $command = 'chown'; $arg = $owner; $kind = '-owner'; @@ -437,7 +437,7 @@ function _drush_perms_build_chown_command($base_dir, $owner, $group) { $command = 'chgrp'; $arg = $group; $kind = '-group'; - $priviledged = FALSE; + $privileged = FALSE; } elseif (!empty($group)) { $chmod_template = "!cmd ^owner:^group --"; @@ -479,10 +479,10 @@ function _drush_perms_build_chown_command($base_dir, $owner, $group) { '^group' => $group, ) ); - if ($priviledged) { - // Mark #priviledged to indicate the superuser priviledges + if ($privileged) { + // Mark #privileged to indicate the superuser privileges // are always necessary to run this command (changing owner). - $result['#priviledged'] = TRUE; + $result['#privileged'] = TRUE; } } return $result;