Access control is a fundamental concern in any system that manages resources, eg, operating systems, file systems, databases and communications systems. The problem we address is how to specify, enforce, and implement access control in distributed environments. Starting from an access relation between users and resources, we derive a user hierarchy, a resource hierarchy, and a unified hierarchy. The unified hierarchy is then used to specify the access relation in a way that is compact and that allows efficient queries. It is also used in cryptographic schemes that enforce access rights. We introduce three specific cryptography-based hierarchical access schemes, which can effectively enforce and implement access control and are designed for distributed environments.