Ili devas ne fermi la pordon - That's exactly how I wish Esperanto would express "They must not close the door.", but I can't find any evidence that Esperanto does this.
From my searches "ne devas fari ion" can mean either "must not do something" or "do not have to do something".
This is not a special problem in Esperanto - it is actually the normal situation in languages. The logical distinction between "must not" and "do not have to" is left to context, intonation or gestures in most languages I know (you can see the list displayed after my name); English is one of the exceptions.
Yes, that is the distinction English makes.
But can you specify how Esperanto would make this distinction clear (beyond all ambiguity) in words alone (no contextual help, no intonational distinctions, no gestures etc.)?
In fact, is there any language you know, other than English, that makes this distinction clear through words alone?
Okay.... That was way telegraphic. Verb phrase: a word or phrase that acts as a verb. Noun phrase: a word or phrase that behaves as a subject or object. Bezoni: to need. Mi bezonas nenion: I need nothing. (Nothing is a noun.) Devi: must. Oni ne devas kuri: one must not run. (Run is a verb.)