Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
provision
Commits
0468eed6
Commit
0468eed6
authored
Nov 28, 2008
by
anarcat
Committed by
anarcat
Nov 28, 2008
Browse files
try to fix permissions by changing less stuff
See:
#338657
parent
a5826b4c
Changes
2
Hide whitespace changes
Inline
Side-by-side
platform/provision_drupal.module
View file @
0468eed6
...
...
@@ -95,13 +95,19 @@ function _provision_drupal_create_settings_file($url, &$data) {
*/
function
_provision_drupal_create_directories
(
$url
,
$profile
=
NULL
)
{
$paths
=
array
(
"sites/
$url
"
=>
075
0
,
"sites/
$url
"
=>
075
5
,
"sites/
$url
/files"
=>
02770
,
"sites/
$url
/files/tmp"
=>
02770
,
"sites/
$url
/files/images"
=>
02770
,
"sites/
$url
/files/pictures"
=>
02770
,
"sites/
$url
/themes"
=>
02750
,
"sites/
$url
/modules"
=>
02750
,
"sites/
$url
/themes"
=>
0755
,
"sites/
$url
/modules"
=>
0755
,
);
$grps
=
array
(
"sites/
$url
/files"
,
"sites/
$url
/files/tmp"
,
"sites/
$url
/files/images"
,
"sites/
$url
/files/pictures"
,
);
foreach
(
$paths
as
$path
=>
$perm
)
{
...
...
@@ -111,18 +117,20 @@ function _provision_drupal_create_directories($url, $profile = NULL) {
t
(
"Could not create <code>@path</code>"
),
PROVISION_PERM_ERROR
|
PROVISION_INSTALL_ERROR
);
}
provision_path
(
"chown"
,
$path
,
PROVISION_SCRIPT_USER
,
provision_path
(
"chmod"
,
$path
,
$perm
,
t
(
"Changed permissions of <code>@path</code> to @confirm"
),
t
(
"Could not change permissions <code>@path</code> to @confirm"
),
PROVISION_PERM_ERROR
|
PROVISION_INSTALL_ERROR
);
}
foreach
(
$grps
as
$path
)
{
provision_path
(
"chown"
,
$path
,
PROVISION_SCRIPT_USER
,
t
(
"Changed ownership of <code>@path</code>"
),
t
(
"Could not change ownership <code>@path</code>"
),
PROVISION_PERM_ERROR
|
PROVISION_INSTALL_ERROR
);
provision_path
(
"chgrp"
,
$path
,
PROVISION_WEB_GROUP
,
t
(
"Changed group ownership of <code>@path</code>"
),
t
(
"Could not change group ownership <code>@path</code>"
));
provision_path
(
"chmod"
,
$path
,
$perm
,
t
(
"Changed permissions of <code>@path</code> to @confirm"
),
t
(
"Could not change permissions <code>@path</code> to @confirm"
),
PROVISION_PERM_ERROR
|
PROVISION_INSTALL_ERROR
);
}
}
...
...
provision.inc
View file @
0468eed6
...
...
@@ -340,6 +340,10 @@ function provision_save_site_data($url, $data) {
$fp
=
fopen
(
$conf_file
,
'a+'
);
//Append to the end of the config file.
fwrite
(
$fp
,
"<?php
\n
"
);
fclose
(
$fp
);
provision_path
(
"chmod"
,
$conf_file
,
0600
,
t
(
"Changed permissions of <code>@path</code> to @confirm"
),
t
(
"Could not change permissions <code>@path</code> to @confirm"
),
PROVISION_PERM_ERROR
|
PROVISION_INSTALL_ERROR
);
}
$fp
=
fopen
(
$conf_file
,
"a+"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment