IMCE and user privileges I have a taxonomy like this in our Drupal 7 website.

(Group1)
 |
 +---- (Group1SubGroup1)
 +---- (...)
 +---- (Group1SubGroup10)

(Group2)
 |
 +---- (Group2SubGroup1)
 +---- (...)
 +---- (Group2SubGroup4)
 ...


And we've use a module (I dont remember the name) that gives users rights depending on the term. For example, for user1 we give him CRUD rights on Group2SubGroup4, but nothing on Group2SubGroup1.

There's a shared directory where you can upload media files when you create an article.

So, when the user1 want to create a new article with term Group2SubGroup4, we'd like to  give him rights to upload a file, but only in a sub-directory of the "shared multimedia files directory" called Group2SubGroup4. 

For example if the directory is /www/htdocs/multimedia, when the user1 want to create a new article with term Group2SubGroup4, he will have rights to upload multimedia files but its "base" directory will be /www/htdocs/multimedia/Group2SubGroup4

How would you do this?

And if you have an easy solution for this, I'd like to do more: have the rights to write on the right directory (/www/htdocs/multimedia/Group2SubGroup4) and still the possibility to read everything else (/www/htdocs/multimedia and other subdirectories). How would you do this?
The solution was easy: it's already integrated in Drupal. Just activate the media module and go to Administration-&gt;Configuration-&gt;Media and there's a very, very, very²²³ powerful IMCE configuration panel.