To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.
I went round and round with this issue. Changing folder permissions (running WordPress on a virtual server managed with Virtualmin).
Turned into a pretty easy fix once I knew exactly how to fix it. Which seems to be the case often with Linux. When you’re not an uber-tech geek and prefer a GUI environment compared to command line, it can feel like a lot of time gets wasted quickly.
Anyway, the cure for me was adding this line to the wp-config.php file
define( 'FS_METHOD', 'direct' );