ANSWER: The Old Testament does permit slavery (servitude) but only under special circumstances and with restrictions. The Bible says an Israelite (Hebrew) father could sell his daughter as a slave (Exodus 21:7, Nehemiah 5:5), the child of a widow could be sold as one to pay her father's debt (2Kings 4:1), and both men and women could sell themselves into slavery (Leviticus 25:39, 47, Deuteronomy 15:12 - 17).
Slavery within Israel was meant to be far more humane than the practices adopted by the rest of the world. The Bible commanded that those in such bondage receive good treatment (Leviticus 25:43 - 46). They were allowed to have a wife, children, and even their own money (Exodus 21). They could receive gifts when freed (Deuteronomy 15:13). Males, after circumcision (if they were not already), were allowed to partake in the Passover and other religious ceremonies in worshipping God.
Those who were subjected to any form of slavery could receive their freedom in a number of ways. They could be bought or redeemed by themselves or any near relative (Leviticus 25:48 - 55). If they worked six years, in the seventh year of service they were set free (Exodus 21). In the Jubilee year, which occurred once every fifty years, all those in servitude (servants) were set free (Leviticus 25:40). Servants who were abused by their master and maimed (e.g. lost a tooth or eye) were set free (Exodus 21). Those under the burden of slavery could, not surprisingly, also be set free directly by God (Jeremiah 34:8 - 10).
In the New Testament, Jesus never deals directly with the issue of owning other humans one way or the other in his teachings. It should also be noted that the Greek word doulos (Strong's Concordance #G1401), translated "servant," can mean "slave," however, or vice versa.
The Apostle Paul discusses slavery. Interestingly, Paul neither offers a clear condemnation of the institution or justifies its practice. He does encourage Philemon (Philemon 10 - 18), a slaveholder, to take back a runaway who had converted to Christianity. There are texts in which servants or slaves are told to obey, not revolt against, their masters (Colossians 3:22, Ephesians 5:5 - 9, 1Timothy 6:1, Titus 2:9). Ultimately, Paul does not think the status of being bound by slavery or not matters spiritually in the sight of God (Colossians 3:11).
One could use (say) the Golden Rule of Jesus or the Great Commandment of loving one's neighbor as one's self as enough of a reason to be against slavery. Hence, if you loved someone equal to yourself, and you would not want to be in servitude to another, then you would not put them in bondage to you. That said, it must be admitted that there is no explicit condemnation of owning them in the New Testament. As a side note, the Essenes, who were one of the four major Jewish sects that existed in Palestine during the time of Jesus, were against this practice and asserted it was repugnant to nature.
It is only recently that the Islamic world officially abolished slavery even as the West has done. The Islamic (Arab) world received (through East Africa) a number of bondslaves generally estimated to number as many as those sent across the Atlantic in the better known West African trade. Saudi Arabia only officially abolished the practice around 1962 or so, ironically about the same time Malcom X visited Mecca! During the Sudan's long civil war, Muslims in the north sold their opponents into servitude to the Christians or animists of the south. As a matter of history, those who believed in the God of Scripture have been in the lead in abolishing slavery, while the Muslim world has generally lagged behind on the issue.