Buying lottery tickets is permissible only if the institute organizing the lottery sells the tickets solely to collect money for philanthropic purposes, and people are aware of this and buy such tickets with the intention to contribute to such objectives, and that the entire net profit of selling the tickets will be spent in such philanthropic purposes, and this is explained to everybody and they are agreed.
[Note: For other opinions on this topic search: lottery.]