CC-1024 Update installation/build for webapp-only
Moved more installation stuff into PHP. For some reason it's having trouble creating the cc_playlistcontents table. Removed old installer files that are no longer used.
This commit is contained in:
parent
2eea85d502
commit
739801d180
11 changed files with 235 additions and 1525 deletions
|
@ -61,4 +61,27 @@ function campcaster_db_connect($p_exitOnError = true) {
|
|||
}
|
||||
}
|
||||
|
||||
function install_setDirPermissions($filePath) {
|
||||
global $CC_CONFIG;
|
||||
$success = chgrp($filePath, $CC_CONFIG["webServerUser"]);
|
||||
$fileperms=@fileperms($filePath);
|
||||
$fileperms = $fileperms | 0x0010; // group write bit
|
||||
$fileperms = $fileperms | 0x0400; // group sticky bit
|
||||
chmod($filePath, $fileperms);
|
||||
|
||||
// Verify Smarty template dir permissions
|
||||
$fileGroup = filegroup($CC_CONFIG["smartyTemplateCompiled"]);
|
||||
$groupOwner = (function_exists('posix_getgrgid'))?@posix_getgrgid($fileGroup):'';
|
||||
if (!empty($groupOwner) && ($groupOwner["name"] != $CC_CONFIG["webServerUser"])) {
|
||||
echo " * Error: Your directory permissions for {$filePath} are not set correctly.<br>\n";
|
||||
echo " * The group perms need to be set to the web server user, in this case '{$CC_CONFIG['webServerUser']}'.<br>\n";
|
||||
echo " * Currently the group is set to be '{$groupOwner['name']}'.<br>\n";
|
||||
exit(1);
|
||||
}
|
||||
if (!($fileperms & 0x0400)) {
|
||||
echo " * Error: Sticky bit not set for {$filePath}.<br>\n";
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue