PDA

View Full Version : modules/install/vw_idx_check.php perms value incorrect


kriggins
14-12-04, 01:22 PM
the @chmod command permission value is set using 777 which is read as a decimal value and not an octal permissions mask. 0777 is the correct value to make the files/directories owner, group and word writable. The following patch will fix this.

*** modules/install/vw_idx_check.php 2004-12-13 21:19:26.000000000 -0600
--- modules/install/vw_idx_check.php.new 2004-12-13 21:13:00.000000000 -0600
***************
*** 100,107 ****
<?php
if ( (file_exists( $cfgFile ) && !is_writable( $cfgFile )) || (!file_exists( $cfgFile ) && !(is_writable( $cfgDir ))) ) {

! @chmod( $cfgFile, 777 );
! @chmod( $cfgDir, 777);
$okMessage="<span class='error'> 777</span>";

}
--- 100,107 ----
<?php
if ( (file_exists( $cfgFile ) && !is_writable( $cfgFile )) || (!file_exists( $cfgFile ) && !(is_writable( $cfgDir ))) ) {

! @chmod( $cfgFile, 0777 );
! @chmod( $cfgDir, 0777);
$okMessage="<span class='error'> 777</span>";

}
***************
*** 114,120 ****
$okMessage="";
if (is_writable( $filesDir )) {

! @chmod( $filesDir, 777 );
$okMessage="<span class='error'> 777</span>";

}
--- 114,120 ----
$okMessage="";
if (is_writable( $filesDir )) {

! @chmod( $filesDir, 0777 );
$okMessage="<span class='error'> 777</span>";

}
***************
*** 127,133 ****
$okMessage="";
if (is_writable( $tmpDir )) {

! @chmod( $tmpDir, 777 );
$okMessage="<span class='error'> 777</span>";

}
--- 127,133 ----
$okMessage="";
if (is_writable( $tmpDir )) {

! @chmod( $tmpDir, 0777 );
$okMessage="<span class='error'> 777</span>";

}
***************
*** 140,146 ****
$okMessage="";
if (is_writable( $locEnDir )) {

! @chmod( $locEnDir, 777 );
$okMessage="<span class='error'> 777</span>";

}
--- 140,146 ----
$okMessage="";
if (is_writable( $locEnDir )) {

! @chmod( $locEnDir, 0777 );
$okMessage="<span class='error'> 777</span>";

}


Kevin