I have installed Nextcloud via snaps, and it stores its files under /var/snap/nextcloud/common/nextcloud/data/FriedRose/files, owned by root. I like to give my normal user access to read and write to /var/snap/nextcloud/common/nextcloud/data/FriedRose/files/downloads.
How can I achieve this without creating a security risk or breaking the snap package? Is giving all directories in this path the executable permission, and giving the downloads directors read and write permission, a good solution? (chmod a+x ...). If this is a good solution, then is there a way to automatically do it or should I write a little function to break up a path into all its directories?
You shouldn't access directly to this data folder, and file modification will break your nextcloud instance as it store many meta data (file size, file hash, etc...) into a database.
If you need to share a folder between Nextcloud and a local user, you should use External Storage which is a Nextcloud module.
https://docs.nextcloud.com/server/14/admin_manual/configuration_files/external_storage_configuration_gui.html
With this module, you will be able to add an external storage as folder (choose Local as Storage) and choose any folder on your hard drive where you will store your data.