In an nextCloud server if you change the permissions of an external drive to give r/w access (in my case chgrp www-data) and nextCloud isn’t updating those permissions you can do this. In your MySQL database find your external storage in oc_storages and make note of the numeric id. Then run this query “Delete from oc_filecache where storage = numeric_id” replacing numeric_id with the one you found in the oc_storages table.