That was the rule previously Sir. I asked a flagman once about this. He told me to contact SSE of concerned division for giving written permission.
.
Still now, for staying at a particular railway station for entire night and shooting with DSLR, one has to take prior permission I think.
.
But...
more... for clicking photos with mobile and small camera, no one should ideally stop you, if you have a valid ID Card and Ticket.