I was trying to experiment with users, groups, and permissions. The results can be seen below:
vagrant@cats:/$ ls -l | grep home
drwxr-xr-x 5 root admin 4096 Sep 28 05:49 home
vagrant@cats:/$ cat /etc/group | grep "^admin"
admin:x:1002:vagrant
vagrant@cats:/$ cd home
vagrant@cats:/home$ pwd
/home
vagrant@cats:/home$ cd ..
vagrant@cats:/$ sudo chmod 770 home
vagrant@cats:/$ ls -l | grep home
drwxrwx--- 5 root admin 4096 Sep 28 05:49 home
vagrant@cats:/$ cd home
-bash: cd: home: Permission denied
vagrant@cats:/$ ?
I don't understand why I can't get in. The user vagrant is in the group admin, the group admin owns the directory home and only the owner and or group members can read, write or execute files in home. But for some reason I'm locked out. What am I missing here?