scandir(/tmp): failed to open dir: Permission denied in mscan-ajax-functions.php on line 1927

Home Forums BulletProof Security Pro scandir(/tmp): failed to open dir: Permission denied in mscan-ajax-functions.php on line 1927

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #41839
    Nelsey
    Participant

    Using version 16.6 we are getting a php error.

    [11-May-2022 13:17:57 UTC] PHP Warning: scandir(/tmp): failed to open dir: Permission denied in www/wp-content/plugins/bulletproof-security/includes/mscan-ajax-functions.php on line 1927
    [11-May-2022 13:17:57 UTC] PHP Warning: scandir(): (errno 13): Permission denied in www/www/wp-content/plugins/bulletproof-security/includes/mscan-ajax-functions.php on line 1927
    [11-May-2022 13:17:57 UTC] PHP Warning: Invalid argument supplied for foreach() in www/wp-content/plugins/bulletproof-security/includes/mscan-ajax-functions.php on line 1929

    We have the includes folder set to permission 755 and the mscan-ajax-functions.php  file set to 644.  If that is wrong, please let me know.

    Thank you for your help.

    #41840
    AITpro Admin
    Keymaster

    The php error message means that your /tmp folder is not scannable.  The current MScan code checks if the /tmp folder exists and if it is writable, but I also need to add another condition to check if the /tmp folder is readable.  That will be done in the next BPS Pro version.  For now just ignore this php error.

    if ( function_exists('sys_get_temp_dir') ) {
    	$sys_get_temp_dir = sys_get_temp_dir();
    				
    	if ( is_dir( $sys_get_temp_dir ) && wp_is_writable( $sys_get_temp_dir ) ) {
    		
    		$tmp_files = scandir($sys_get_temp_dir);
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.