first of all any online train booked ticket is not transferable.This has been made to prevent possible misuse of facility by the agents and brokers.
However, if reasonable case should arise, following provisions has been made:
(both for online/counter and offline/counter ticket)
Chief Reservation Supervisor of important stations are authorized by Railway Administration to permit the change of name of a passenger having a seat or berth reserved in his name in the following circumstances namely :
(a) Where the passenger is a Government Servant, proceeding on duty and appropriate authority, makes a request in writing 24 hours before the scheduled departure of trains
(b) Where the passenger makes a request in writing 24 hours before the scheduled departure of the train that the reservation made in his name may be transferred to another member of his family, meaning, Father, Mother, Brother, Sister, Son, Daughter, Husband and Wife.
(c) Where the passengers are students of a recognized educational institution and the Head of the institution makes a request in writing 48 hours before the scheduled departure of the train, that the reservation made in the name of any student be transferred to any other student of the same institute.
(d) Where the passengers are members of a marriage party and any person deemed to be Head of such party makes a request in writing 48 hours before the scheduled departure of the train that the reservation made in the name of any member of the marriage party be transferred to any other person.
(e) Where the passengers are a group of cadets of National Cadet Corps (NCC) and any officer who is the head of the group, makes a request in writing at least 24 hours before the departure of the train that the reservation made in the name of any cadet be transferred to any other cadet.
Such request will be granted only once. Regarding item no. (c), (d) and (e), such request for change in excess of 10% of the total strength of group shall not be granted.
Notice:
Above rules can be found on http://www.indianrail.gov.in/change_Name.html