Issue with shared folders and subfolder permissions

Login with browser to Nextcloud and call the “Apps” - “Files”. Select the app “File Access Control”:

If you think, that it meets your needs install and test it.