Is it legal or ethical to obtain the previously published pdf from archive.org or some other site? One example is "Algorithms" by S. Dasgupta, C.H. Papadimitriou, and U.V. Vazirani, which was previously available on Dasgupta's webpage but later taken offline when the book was published in paper form.
The other situation would be course notes that were publically accessible but later removed from the webpage but still available on archive.org.