plugin installation failure

"Installation of Post Indexer failed. Most likely reason for this are wrong folder permissions of your wp-contents folder."

How can I check and correct this using terminal?