#12 Access MKDIR only works 1st time if UNLINK disabled

v0.1.13
closed-fixed
Eric Faerber
6
2005-05-25
2005-05-18
Yves Kreis
No

Code:
function check_access_mkdir( &$access_msg)
{
global $lang ;

// check for server mkdir access
if ( mkdir( 'EM_test_dir', 0777))
{
// clean up!
rmdir( 'EM_test_dir') ;

$access_msg = 'OK' ;
return true ;
}
else
{
$access_msg = $lang['EM_failed'] ;
return false ;
}
}

The function (in easymod_display_functions.php) tries to
clean up the directory that was temporarly created.
However if the directory cannot be unlinked, it will exist
during the next test cyclus and always return false.

Discussion

    • labels: --> 734919
     
    • priority: 5 --> 6
     
    • summary: [0.1.13] Access MKDIR only works 1st time if UNLINK disabled --> Access MKDIR only works 1st time if UNLINK disabled
     
    • labels: 734919 --> Installation
     
    • milestone: --> v0.1.13
     
  • Eric Faerber
    Eric Faerber
    2005-05-25

    • assigned_to: nobody --> wgeric
     
  • Eric Faerber
    Eric Faerber
    2005-05-25

    • status: open --> closed-fixed
     
  • Eric Faerber
    Eric Faerber
    2005-05-25

    Logged In: YES
    user_id=657440

    I've done a workaround for this since we can't delete the
    directory because we don't have unlink (rmdir) access. I
    have made it so that if the directory exists, then it
    assumes you have mkdir access. There could be problems with
    this. The change is in CVS.