check if an user can write in a (shared) directory