Praise be to Allaah.
It
is not permissible to buy or sell in the mosque, whether that involves
books or anything else, even if the proceeds are to benefit orphans
etc. But there is nothing wrong with putting them in a special box and
writing the prices on them, and putting a money-box with it so that
whoever wants a copy can put the money in the money-box and take a copy,
without any bargaining, haggling, offering or acceptance. And Allaah
knows best.
Al-Fataawa al-Jibreeniyyah fi’l-A’maal al-Da’wiyyah li Fadeelat al-Shaykh ‘Abd-Allaah ibn Jibreen, p. 32