If you have configured a LAMP or WAMP setup on your local machine and you have installed WordPress for testing purposes, you might be surprised to be asked for your ftp connection details when you attempt to run the automated update feature of a theme, plugin or WordPress itself.
This usually happens if you haven’t configured folder permissions properly, so the first place to look is your WordPress installation folder permissions.
In LAMP, you can check your folder’s current permissions by running the ls -a command in terminal. If your WordPress is configured to run against anything else the www-data, that’s probably why you are prompted for ftp connection details.
To fix this problem simply run the following to make www-data (the Apache user) the owner of WordPress folder and all it’s children (where wordpress is your WordPress installation folder and you are browsing the var/www folder):
sudo chown -R www-data wordpress