A quick solution to this problem is to run the following command. `sudo chown www-data /var/lib/owncloud/themes` This changes the permissions on the folder and allows a custom template to be saved.