Custody is a relationship in which an agent (1) currently has potentially exclusive access to a specific resource or (another) agent, and (2) therefore is socially responsible for excluding contextually unacceptable risky and damaging forces from the resource or agent in custody.
Custody is often directly related to full access or ownership rights. However, custody may be a required function in some contexts without any potentially beneficial rights attached to it. For example, a delivery driver may need to take custody of three pizzas while driving to meet those pizzas' buyer. Likewise, a prison guard may need to take custody of a prisoner during required transportation.