It may be illegal to do so in some areas. For example, ripping a CD for any reason is illegal in the UK, but UK lawmakers have made the situation confusing. If you’re not sure you are allowed to do, consult your local laws and regulations. Ultimately, it depends on where you live. Never do this without consulting the law.