mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 23:55:19 +00:00
add store directory write check to install checks
This commit is contained in:
parent
6eda806444
commit
352e4dc21b
2 changed files with 23 additions and 1 deletions
|
@ -74,11 +74,13 @@ directory/path component in the URL) is REQUIRED.
|
|||
|
||||
git pull
|
||||
|
||||
- make sure folder *view/tpl/smarty3* exists and is writable by webserver
|
||||
- make sure folders *view/tpl/smarty3* and *store* exist and are writable by webserver
|
||||
|
||||
mkdir view/tpl/smarty3
|
||||
mkdir store
|
||||
|
||||
chmod 777 view/tpl/smarty3
|
||||
chmod 777 store
|
||||
|
||||
[This permission (777) is very dangerous and if you have sufficient
|
||||
privilege and knowledge you should make this directory writeable only
|
||||
|
|
|
@ -228,6 +228,8 @@ function setup_content(&$a) {
|
|||
|
||||
check_smarty3($checks);
|
||||
|
||||
check_store($checks);
|
||||
|
||||
check_keys($checks);
|
||||
|
||||
if(x($_POST,'phpath'))
|
||||
|
@ -515,6 +517,24 @@ function check_smarty3(&$checks) {
|
|||
|
||||
}
|
||||
|
||||
function check_store(&$checks) {
|
||||
$status = true;
|
||||
$help = "";
|
||||
|
||||
@mkdir('store',STORAGE_DEFAULT_PERMISSIONS);
|
||||
|
||||
if( !is_writable('store') ) {
|
||||
|
||||
$status=false;
|
||||
$help = t('Red uses the store directory to save uploaded files. The web server needs to have write access to the store directory under the Red top level folder') . EOL;
|
||||
$help .= t('Please ensure that the user that your web server runs as (e.g. www-data) has write access to this folder.').EOL;
|
||||
}
|
||||
|
||||
check_add($checks, t('store is writable'), $status, true, $help);
|
||||
|
||||
}
|
||||
|
||||
|
||||
function check_htaccess(&$checks) {
|
||||
$a = get_app();
|
||||
$status = true;
|
||||
|
|
Loading…
Reference in a new issue