Update fails to 21.0.3 😱

Update fails due to files in directory…
So this is sort of weird one because Nexcloud refuses to update doe to the “clouddata” folder is there, but it is the place where the user data is stored so it doesn’t make sense at all.

I have attempted to delete it (temporary) along with error-log but then it starts to whine that the “clouddata” folder is missing instead. So its the hen or the egg kind of issue i suppose or catch22 if you will. :upside_down_face:


So how can this issue be solved so I can actually run the update? :thinking:

Thanks in advance for the help.
Kind regards

Anyone here that could help with this issue please?

Kind regards

Can you share your config.php, please remove the passwords and usernames before

Thank you for your reply @wagnbeu0 . :smiley:

Here is the request data:

$CONFIG = array (
  'instanceid' => 'data-removed-for-security-reason',
  'passwordsalt' => 'data-removed-for-security-reason',
  'secret' => 'data-removed-for-security-reason',
  'trusted_domains' => 
  array (
    0 => 'somedomain.com',
  'datadirectory' => '/home/public_html/clouddata',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => 'https://somedomain.com',
  'dbname' => 'data-removed-for-security-reason',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'data-removed-for-security-reason',
  'dbpassword' => 'data-removed-for-security-reason',
  'installed' => true,
  'htaccess.RewriteBase' => '/',
  'default_phone_region' => 'GB',
  'default_language' => 'en',
  'default_locale' => 'en_US',
  'session_keepalive' => true,
  'auth.bruteforce.protection.enabled' => true,
  'trashbin_retention_obligation' => 'auto',
  'versions_retention_obligation' => 'auto',
  'log_type' => 'file',
  'logtimezone' => 'Europe/Gibraltar',
  'mail_domain' => 'somedomain.com',
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'tls',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'notify',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtphost' => 'mail.somedomain.com',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'data-removed-for-security-reason',
  'mail_smtppassword' => 'data-removed-for-security-reason',

Kind regards

Can you move the data directory to any other mountpoint and change the path in this file?
For example if you move it to /mnt/clouddata and then change the path in config.php to /mnt/clouddata?

For sure, I could try that and see what happens.
I’ll get back later with the results.
Thank you!

Kind regards

Hi @wagnbeu0
Same thing happens again, but now it complains over “mnt” folder too:

Not sure what to do really… :thinking:

Kind regards

Very strange. Have you ever tried a manual update?
That means you rename the nextcloud folder, and do a fresh install?
Installation as described here?

But before you open nextcloud in the bwoser you copy the config.php from your old installation into the new one - so you have a fresh installation, but keep all your settings

Don’t hesitate to search the forum for topics with similar issues and how they were solved. Extra files means there are files that are not normally used there by Nextcloud. The data folder within the Nextcloud folder (if not outside this folder) is by default called data. The logfiles shouldn’t be in the main folder either. In which folder did you put Nextcloud that there are so many additional files?

I found out that in some cases, especially if the installation was done in a not so recommended ways its better teo replace the nextcloud folder with a fresh one, and keep the data directory outside the nextcloud folder. Then all you need to do is just copying the config.php to the new installation - viola, you´re done

So you could add the folder one level up instead totally outside of the www root directory?


Thanks in advance.

Already done that and didn’t find anything. :scream:
I’ve been searching for hours and didn’t find issues that resembles ours; both on Google, duckduckgo.com and the Nextcloud forums.

Its added there automatically by our server.
We have our own VPS server which we chosen to partition up with C-panel for easier management. So no this is not shared hosting and some cheap host.

We use the public_html root folder.

You can have the data folder everywhere, I pesonally have it stored on a mounted QNAP for data security which is stored on /mnt/qnap/nextcloud/data

1 Like

So wouldn’t it solve the issue then if I add the folder one level up from www root then?

Thanks in advance.
Kind regards

I guess the mainproblem is that you have many unknown folders and files - no matter where they are coming from.
I always move the data folder out of the nextcloud folder to have it seperated. If you then only have the nextcloud folder, then you can replace it wit a fresh unzipped version and just copy the config.php back - then you have a fresh installation, but the database and the files etc. will remain. Then also this message about unknown files should disappear

You didn’t mention that in the first place. Can you configure it to not put these files/folders there?

For the automatic update procedure you can’t expect it to know if these files/folders do potentially harm, therefore it just tests what to expect from Nextcloud’s point of view.

Hi Powerquest, any update?

Hi @wagnbeu0
Sorry for my very long time to respond back to you.
Summer passed by so quickly! :sun_with_face: :beach_umbrella: :wink:

Yes, it finally worked and you rock! :facepunch:
Thank you so much for your kind help!

i did move the data one level up outside of the main www root folder and then ran the update.

It still nagged and complained over cgi-bin, error_log, php.ini and user.ini so I temporally moved those to the trash bin. Ran the update again it ran fine. Then after that I just restored those files. :+1:

Kind regards