I want to allow access to 2 users on one directory. I am trying since days but unable to do so! Let me make it simple for you guys to understand by giving a simple example. But first, Let me tell you that the user named admin should be able to access both the directories.
Consider two Directories:
/var/www/directory1/var/www/directory2
and two users:
user1user2
I want user1 to access only the directory directory1, user2 to access the directory directory2 and admin to access both the directories!
I tried giving ownership to respective directories to the users and the group named admin-group to let admin access both the directories. That didn't work well. I also tried giving write access to the group but failed.
Is it possible to do what I want? If possible, How can I?