One of the rights that a prisoner is entitled to in prison which are implicitly provided under the Article 21 of the Constitution of India free legal aid.
Prisoners are also entitled to rights to some extent as a normal human being when they are behind the prison. These rights are provided under the Constitution of India, the Prisons Act, 1894 etc. Prisoners are persons and have some rights and do not lose their basic constitutional rights.
The basic rights include right to food and water, right to have an attorney to defend himself, protection from torture, violence and racial harassment.
The rights guaranteed in the part III of Indian Constitution are available to prisoners; because a prisoner is treated as a person in prison.
As per Prisons act,1990:
it is the duty of the government for the removal of any prisoner detained under any order or sentence of any court, which is of unsound mind to a lunatic asylum and other place where he will be given proper treatment. Similarly if there is apprehension of danger to the life of the prisoner from other inmates, he can be transferred to some other prison at the recommendation of the superintendent of the prisons.