Skip to content

Commit

Permalink
Verify conf/ directory is writable in the do=check action
Browse files Browse the repository at this point in the history
  • Loading branch information
bug committed Nov 5, 2011
1 parent f11b7d1 commit 4c7ecf1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions inc/infoutils.php
Expand Up @@ -175,6 +175,12 @@ function check(){
msg('Lockdir is not writable',-1);
}

if(is_writable(DOKU_CONF)){
msg('conf directory is writable',1);
}else{
msg('conf directory is not writable',-1);
}

if($conf['authtype'] == 'plain'){
global $config_cascade;
if(is_writable($config_cascade['plainauth.users']['default'])){
Expand Down

2 comments on commit 4c7ecf1

@bug
Copy link
Collaborator Author

@bug bug commented on 4c7ecf1 Nov 5, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a fantastic check, but necessary :-) I'm not familiar with the new cascading config, so if someone could double check that checking DOKU_CONF is enough that would be great.

@selfthinker
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As preload.php is loaded before load.php (which calls infoutils.php), this should also be fine for farms.
The core config cascade uses only DOKU_CONF and farms overwrite it, although farms also use DOKU_INC/conf. But they use DOKU_CONF to write in, while they use DOKU_INC/conf only to read from. So, I think this is fine.

Please sign in to comment.