If you’re pretty sure about that the file owner of wordpress folder is as same as that one who runs apache. (use ps aux|grep 'httpd'
or ps aux|grep 'apache'
)
Here is a lousy solution for you:
function force_use_direct_fs($method,$args){
if($method != 'direct')
$method = 'direct';
return $method;
}
add_filter('filesystem_method','force_use_direct_fs',10,2);
Why Would WordPress Request FTP Credentials
wp-admin/includes/file.php
In function get_filesystem_method
WordPress will determine the proper filesystem method by comparing the file owner of a temporary file to the user who runs the web server.
Here is the code:
if( getmyuid() == @fileowner($temp_file_name) )
$method = 'direct';
That’s why I still think the cause is the wrong file owner permission.