Commit 2bdf5e79 authored by anarcat's avatar anarcat Committed by anarcat

try to fix #242366: uncomment the permission checks in sites directory creation

fix the name of the user/group variables: it's now provision_script_user and provision_web_group, to follow what is configured in hosting

now this works, but the hostmaster user (or the script running the cron job) needs to be part of the provision_web_group
parent a9ce0027
...@@ -147,7 +147,6 @@ function _provision_drupal_create_directories($url, $profile = null) { ...@@ -147,7 +147,6 @@ function _provision_drupal_create_directories($url, $profile = null) {
t("Could not create <code>%path</code>", array("%path" => $path)), t("Could not create <code>%path</code>", array("%path" => $path)),
PROVISION_PERM_ERROR | PROVISION_INSTALL_ERROR ); PROVISION_PERM_ERROR | PROVISION_INSTALL_ERROR );
} }
/*
provision_check_path($path, "chown", provision_get_script_owner(), provision_check_path($path, "chown", provision_get_script_owner(),
t("Changed ownership of <code>%path</code>", array("%path" => $path)), t("Changed ownership of <code>%path</code>", array("%path" => $path)),
t("Could not change ownership <code>%path</code>", array("%path" => $path)), t("Could not change ownership <code>%path</code>", array("%path" => $path)),
...@@ -159,9 +158,8 @@ function _provision_drupal_create_directories($url, $profile = null) { ...@@ -159,9 +158,8 @@ function _provision_drupal_create_directories($url, $profile = null) {
provision_check_path($path, "chmod", $perm, provision_check_path($path, "chmod", $perm,
t("Changed permissions of <code>%path</code> to %perms", array("%path" => $path, '%perms' => $perms)), t("Changed permissions of <code>%path</code> to %perms", array("%path" => $path, '%perms' => $perms)),
t("Could not change ownership <code>%path</code> to %perms", array("%path" => $path, '%perms' => $perms)), t("Could not change ownership <code>%path</code> to %perms", array("%path" => $path, '%perms' => $perms)),
PROVISION_PERM_ERROR | PROVISION_INSTALL_ERROR ); */ PROVISION_PERM_ERROR | PROVISION_INSTALL_ERROR );
} }
} }
/** /**
......
...@@ -461,7 +461,7 @@ function provision_set_active_db($new_db_url = null) { ...@@ -461,7 +461,7 @@ function provision_set_active_db($new_db_url = null) {
* Used to generate permissions. Can be overridden by variable_set(). * Used to generate permissions. Can be overridden by variable_set().
*/ */
function provision_get_script_owner() { function provision_get_script_owner() {
return variable_get('provision_user', get_current_user()); return variable_get('provision_script_user', get_current_user());
} }
/** /**
...@@ -471,7 +471,8 @@ function provision_get_script_owner() { ...@@ -471,7 +471,8 @@ function provision_get_script_owner() {
*/ */
function provision_get_group_name() { function provision_get_group_name() {
$info = posix_getgrgid(posix_getgid()); $info = posix_getgrgid(posix_getgid());
return variable_get('provision_group', $info['name']); print_r($info);
return variable_get('provision_web_group', $info['name']);
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment