File Transfer failed, reason: Cannot create directory /var/www/html/modules
The chmod a+x isn't enough, the directory should have write permission for HTTP server user, so try:

chmod 755 /var/www/html


Prefix with sudo if it's necessary.

or if you've already some files in it, try:

chmod -R u+rwX,go+rX,go-w /var/www/html


and if you're using Apache, you should change the ownership by:

chown -R www-data:www-data /var/www/html


If www-data is not correct, you can find the Apache user by the following command:

ps axho user,comm|grep -E "httpd|apache"|uniq|grep -v "root"|awk 'END {if ($1) print $1}