The parent directories need execute all permissions.
First test is a reproducer for https://github.com/rfjakob/gocryptfs/issues/394 "Group permissions: No write access"