diff --git a/utils/Commands/DownloadextensionCommand.php b/utils/Commands/DownloadextensionCommand.php
index 2a021eeea..0b0c81b4e 100644
--- a/utils/Commands/DownloadextensionCommand.php
+++ b/utils/Commands/DownloadextensionCommand.php
@@ -58,6 +58,11 @@ class DownloadextensionCommand extends Command
$output->writeln("Using configuration from '".$settings->_configFilePath."'.", OutputInterface::VERBOSITY_VERBOSE);
+ if (!is_writable($settings->_cacheDir)) {
+ $output->writeln(sprintf("The cache dir '%s' is not writable for the system user running this script.", $settings->_cacheDir));
+ return Command::FAILURE;
+ }
+
$reposurl = $input->getOption('url');
if($reposurl)
$extmgr->setRepositoryUrl($reposurl);
diff --git a/utils/Commands/UpdateextensionCommand.php b/utils/Commands/UpdateextensionCommand.php
index e6ee4dd4e..a7eef574e 100644
--- a/utils/Commands/UpdateextensionCommand.php
+++ b/utils/Commands/UpdateextensionCommand.php
@@ -55,6 +55,11 @@ class UpdateextensionCommand extends Command
$output->writeln("Using configuration from '".$settings->_configFilePath."'.", OutputInterface::VERBOSITY_VERBOSE);
+ if (!is_writable($settings->_cacheDir)) {
+ $output->writeln(sprintf("The cache dir '%s' is not writable for the system user running this script.", $settings->_cacheDir));
+ return Command::FAILURE;
+ }
+
$reposurl = $input->getOption('url');
if($reposurl)
$extmgr->setRepositoryUrl($reposurl);