In order to deduct mortgage interest the mortgage must be a secured debt on a qualified home in which you have an ownership interest. This means that if you do not have an ownership interest in the property you cannot take a deduction for the interest on the mortgage related to that property.
The deduction for real estate taxes is similar but with a twist. Real estate taxes are only deductible by the person upon whom the taxes are assessed. However, a person who owns a beneficial interest in property who pays taxes on that property to protect that interest may deduct the payment, even though the tax is assessed against another person who holds the legal title to the property.