10.0.2 update fails: The following extra files have been found

Exact syntax of error:

Check for expected files

The following extra files have been found:

I see from another post that I can safely remove assets, but didn’t find anything about .well-known (can it be removed and where is it).


I had the same error with the assets directory. I just removed it … every thing works fine after that.


Thank you. I went ahead and removed both the assets and the .well-known directories and that stage now passes. But now it fails copying files to the updater directory (abridged error below). That directory is owned by root and is 0644 permissions.

Check for write permissions

The following places can not be written to:/var/www/nextcloud/updater/…/ocs-provider/.

(this goes on for many more files)

Duplicate of How to exclude .well-known folder when upgrade?

Oh great, so I’ve blown up Let’s Encrypt now.

About the permissions: This is exactly the problem. Your http user needs to own the whole nextcloud directory to successfully do an upgrade. Have a look into the upgrade part of the admin manual, there you find scripts to change the folder permissions for upgrading and back to strict afterwards.

Thank you. I copied the script and made it executable. It runs but doesn’t return the screen prints I see in it.

I stepped through it line by line and can see that the updater folder is now owned by www-data user and group and is 750, but the update still says it can’t write to the location.

I confirmed that Apache is running as www-data

Check for write permissions

The following places can not be written to:

Sorry, stumbling through this for the first time. In case anyone else is as well, here is the correct command to set perms for upgrading on Ubuntu

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

I found that for this install, which seems small (no local data), but has external links to large directory structures, the web GUI told us to update from the command line. Commands:

cd /var/www/nextcloud
sudo -u www-data php occ upgrade

Yes chown -R www-data:www-data for upgrading and the script for getting secure strong permissions afterwards again.

You can have a look here:

Manual upgrade Nextcloud

and here

Nextcloud - Setting Strong Directory Permissions


I used to have the .well-known in NextCloud, but now I don’t need it anymore.


I got the upgrade done after running chown -R www-data:www-data

But when I run the script to lock things back down, users report this error at the login screen:

Cannot write into “apps” directory.
This can usually be fixed by giving the webserver access to the apps directory or disabling the appstore in the config file.

Rerunning the pre-upgrade command resolves this, but doesn’t seem like the recommended perms for a production system.

The script given in the second link should make the apps directory beside data, config and themes writeable while keeping the remaining secure. In case you need to adjust the directories at the top of the script. As I remember beside data, the apps directory can also be moved to another place. This seems the best solution for production systems for me, as app updates and several configurations stay possible, while the remaining folders stay secure. So just for nextcloud upgrade you need to change.

I followed the above instructions, but when the time to upgrade, it not upgradable.
Therefore, I had to give entire folder of NC permission as of www-data:www-data.

Yeah exactly, for whole nextcloud upgrade the whole folder needs to be owned by www-data:www-data, afterwards for production you should use strong permission according to the admin manual/script again.

So we have to change the permissions of the .well-known file? Or do we delete it? How can you find the file?

my error doesn’t include the “assets” just the “.well-known” file

Ui you open up an old topic :smile.

To not change anything, simply move the .well-known out of your Nextcloud folder, upgrade, and move it inside afterwards again.

Thank you for your response! How can I find out where the file is? I used the find command but nothing turns up…

The integrity check error tells you? Otherwise what is your exact error/integrity check result?

This is my output when trying to upgrade/update to 12.