drush variable-set for permission table I want to enable access comments, post comments, and post comments without approval for anonymous using drush.

Fresh install, the table entry look like this:

INSERT INTO `permission` VALUES (2,2,'access comments, access content, post comments, post comments without approval',0);


After access comments, post comments, and post comments without approval enabled for anonymous, it looks like this:

INSERT INTO `permission` VALUES (3,1,'access comments, post comments, post comments without approval, access content',0);
INSERT INTO `permission` VALUES (4,2,'access comments, post comments, post comments without approval, access content',0);


I can use drush variable-set error_level "0" to change error reporting level. But how about above case? It looks more difficult to understand
There is currently no explicit command to run in order to grant a role a certain permission. The documentation is very helpful here - http://www.drush.org/help/5

However, you can use drush to execute native SQL in order to solve the issue

e.g.

drush sql-query "INSERT INTO permission VALUES (4,2,'access comments, post comments, post comments without approval, access content',0)"


If this is something you will be doing on a regular basis after a site install, consider creating your own custom install profile (which will contain the required SQL, or features), or creating your own custom module (e.g. created using features). I imagine having to run this script over CLI is not the most maintainable solution ;)