I'm with kevinr, not and easy task. Maybe you could use some rules on your space that just execute a script changing the permissions of the uploaded file and then set the proper permissions based on the type. Not very nice solution, and not very confortable but probably much easier thant playing around with Alfresco's permission model.