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.
You need to give full rights (rwx) on the DocumentRoot folder (where you have kept all wordpress files in server), or just change the ownership of your DocumentRoot folder to the web-service (www-data in case of Ubuntu).
# chown -R www-data:www-data yourDocumentRoot
Once you get the proper ownership, just try downloading the theme or plugin or whatever again. And now it should download directly without requiring any FTP connection.