setName('maintenance:update:htaccess') ->setDescription('Updates the .htaccess file'); } protected function execute(InputInterface $input, OutputInterface $output): int { if (\OC\Setup::updateHtaccess()) { $output->writeln('.htaccess has been updated'); return 0; } else { $output->writeln('Error updating .htaccess file, not enough permissions, not enough free space or "overwrite.cli.url" set to an invalid URL?'); return 1; } } }