Users, groups, permissions - specific task question
I would like to know how to do the following permissioning on Linux:
To begin with, I have three user groups:
I also have three directories:
Now I would like to do the following:
1) All users within these groups, no matter where they are have rwx access to any file that *they* create
2) All users within these groups, no matter where they are have read only access to any files that *they didnt* create
1) g1 has rw to /countries, but no further. If possible, I dont even want to give this group the ability to *see* england
2) g2 has rw to /countries and /countries/england, but no further. As with step 1), I dont even want g2 to be able to see any further directories (unless that directory is created by another user).
3) g3 has rw to all directories (/countries, /countries/england and /countries/england/london)
Does this make sense? Can someone give me a brief (if possible) walkthrough on how to achieve this or something similar?