Insert this line at the end of your wp-config.php file. This file is found in your site’s public root directory, sometimes called www, httpdocs or public_html.
define('FS_METHOD','direct');
This will allow your site to bypass all the permission and file ownership warnings and update your WordPress installation to the latest version.
It only works if the web server already owns the WordPress files. It’s not a fix for a permissions error — using it to bypass one is a common way to end up with a world-writable install instead of a correctly configured one.