Hello @akorn
If you are already using some DMS such as Nextcloud, Seafile, Alfresco, etc. then you just need to deploy Document server and integrate it with your DMS. The Community Edition (free version) will cover the editing needs of 5 users. At the same time most of DMSs where Document server can be integrated have their own permissions and file management rules. However, I don’t think there will be any difficulties. The list of integrations for your reference: Ready-to-use connectors for your platform | ONLYOFFICE
If you are going this project from scratch, you can try to deploy DocSpace or Workspace. DocSpace is focused on working with files, while Workspace is ‘all-in-one’ solution with such modules as Mail server, CRM, etc.
By the way, there’s free cloud version of Docspace where you can take a look at its functions:Get a free DocSpace for your business | ONLYOFFICE
All mentioned solutions have free versions that cover described needs.
More links about installation guides for your reference: