Hi all,
this is not a question, but an answer to a question on a locked forum (I am following the hint given there - to start a new topic).
I used to have the same problem as described here: https://moodle.org/mod/forum/discuss.php?d=373556 i.e. I couldn't add a theme to my Moodle installation on Ubuntu. The web server is Apache. In my case the solution was to change access rights for the group www-data to the /var/www/html/moodle/theme directory. It could be changed for example with the following steps:
(in terminal) sudo nautilus,
(in nautilus) go to /var/www/html/moodle/theme,
(after right mouse button click on the folder) Properties>Permissions>change group to 'www-data' and access rights to 'Create and delete files'.
Best regards