To a certain extent, the music companies have only themselves to blame. They were very slow to see the digital revolution which let the pirates and the culture of getting music illegally for free get established.
It to a computer company, Apple and iTunes to make it happen and the record companies were literally dragged into the real world of downloads. Apple have now sold 4 billion songs for which the record campanies happily take the revenue without contributing very much at all.
I have always shared music. I used to make cassette tape compilations and gave them to friends. I do the same on CD. I consider I am doing the record companies (and more importantly the artists) a favour by making people aware of music they would normally not hear.
As long as it is not done for commercial gain, I consider it to be acceptable.
30 years ago, every ablum you bought had a sticker on warning that 'Home Taping is killing Music'. It didn't.