biralo
First, there are two Dokuwiki permissions, access by remoteuser to the API, ACL permissions for the remoteuser to read and/or edit a particular page in a namespace. But the 401 doesn't come from Dokuwiki. It comes from the system. So the question is, apart from ACL, whether your users have read/write access to the directories in question.