Files inaccessible after server migration/OCC scan?

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can. :heart:

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 33.0.2.2
  • Operating system and version (e.g., Ubuntu 24.04):
    • unRAID 7.2.2
  • Web server and version (e.g, Apache 2.4.25):
    • unknown - how do I check?
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • Pangolin 1.17.0
  • PHP version (e.g, 8.3):
    • 8.3.30
  • Is this the first time you’ve seen this error? (Yes / No):
    • yes
  • When did this problem seem to first start?
    • When I started using Nextcloud AIO
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • AIO Docker on unRAID server
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

I recently migrated from the Linuxserver.io Nextcloud container to the official Nextcloud AIO installation on my unRAID server. I had previously set up a share called nextcloud on my unRAID server for the old container’s data, for AIO I created shares called nextcloud-aio and nextcloud-aio-backup with duplicate settings.

When I had AIO configured, I then put the old LSIO Docker instance in Maintenance Mode, recreated the user accounts on the AIO instance, copied the data to my nextcloud-aio share, and ran an OCC scan command to scan the files in. Everything eventually showed up, so I thought I was all set.

However, now, when a user tries to create, edit, or delete files in any of the directories that got copied over, they get denied access to do so. I can create/edit/delete files from any other directories, but not from the ones that got copied over, so I suspect the file permissions are messed up somehow. I’d really rather not have to reupload the content by hand as that will be a tremendous amount of work, so there has to be a way to reset the file’s permissions.

Log entries

Nextcloud

This is a log entry from when I attempted to create a new file in Nextcloud’s Web UI for a specific folder

[no app in context] Error: Could not create path "/USER/files/Photos/test.md"
	POST /ocs/v2.php/apps/files/api/v1/templates/create
	from 192.168.46.213 by USER at Apr 19, 2026, 10:02:13 PM

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

{
    "system": {
        "one-click-instance": true,
        "one-click-instance.user-limit": 100,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "check_data_directory_permissions": false,
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "password": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "overwritehost": "MY_NC_DOMAIN",
        "overwriteprotocol": "https",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "MY_NC_DOMAIN",
            "LOCAL_IP:PORT"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "33.0.2.2",
        "overwrite.cli.url": "https:\/\/MY_NC_DOMAIN\/",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "updatechecker": true,
        "updatedirectory": "\/nc-updater",
        "loglevel": 2,
        "app_install_overwrite": [
            "nextcloud-aio"
        ],
        "log_type": "file",
        "logfile": "\/var\/www\/html\/data\/nextcloud.log",
        "log_rotate_size": 10485760,
        "log.condition": {
            "apps": [
                "admin_audit"
            ]
        },
        "preview_max_x": 2048,
        "preview_max_y": 2048,
        "jpeg_quality": 60,
        "enabledPreviewProviders": {
            "1": "OC\\Preview\\Image",
            "2": "OC\\Preview\\MarkDown",
            "3": "OC\\Preview\\MP3",
            "4": "OC\\Preview\\TXT",
            "5": "OC\\Preview\\OpenDocument",
            "6": "OC\\Preview\\Movie",
            "7": "OC\\Preview\\Krita",
            "0": "OC\\Preview\\Imaginary",
            "23": "OC\\Preview\\ImaginaryPDF"
        },
        "enable_previews": true,
        "upgrade.disable-web": true,
        "mail_smtpmode": "smtp",
        "trashbin_retention_obligation": "auto, 30",
        "versions_retention_obligation": "auto, 30",
        "activity_expire_days": 30,
        "simpleSignUpLink.shown": false,
        "share_folder": "\/",
        "one-click-instance.link": "https:\/\/nextcloud.com\/all-in-one\/",
        "upgrade.cli-upgrade-link": "https:\/\/github.com\/nextcloud\/all-in-one\/discussions\/2726",
        "maintenance_window_start": 100,
        "allow_local_remote_servers": true,
        "davstorage.request_timeout": 3600,
        "documentation_url.server_logs": "https:\/\/github.com\/nextcloud\/all-in-one\/discussions\/5425",
        "htaccess.RewriteBase": "\/",
        "dbpersistent": false,
        "auth.bruteforce.protection.enabled": true,
        "ratelimit.protection.enabled": true,
        "files_external_allow_create_new_local": false,
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "preview_imaginary_url": "***REMOVED SENSITIVE VALUE***",
        "preview_imaginary_key": "***REMOVED SENSITIVE VALUE***",
        "twofactor_enforced": "true",
        "twofactor_enforced_groups": [],
        "twofactor_enforced_excluded_groups": []
    }
}

Apps

The output of occ app:list (if possible).

Enabled:
  - activity: 6.0.0
  - admin_audit: 1.23.0
  - bruteforcesettings: 6.0.0
  - calendar: 6.2.2
  - circles: 33.0.0
  - cloud_federation_api: 1.17.0
  - comments: 1.23.0
  - contacts: 8.4.3
  - contactsinteraction: 1.14.1
  - dashboard: 7.13.0
  - dav: 1.36.0
  - deck: 1.17.0
  - federatedfilesharing: 1.23.0
  - federation: 1.23.0
  - files: 2.5.0
  - files_antivirus: 6.2.0
  - files_downloadlimit: 5.1.0
  - files_pdfviewer: 6.0.0
  - files_reminders: 1.6.0
  - files_sharing: 1.25.2
  - files_trashbin: 1.23.0
  - files_versions: 1.26.0
  - firstrunwizard: 6.0.0
  - logreader: 6.0.0
  - lookup_server_connector: 1.21.0
  - nextcloud-aio: 0.8.0
  - nextcloud_announcements: 5.0.0
  - notes: 4.13.1
  - notifications: 6.0.0
  - notify_push: 1.3.1
  - oauth2: 1.21.0
  - password_policy: 5.0.0
  - photos: 6.0.0
  - privacy: 5.0.0
  - profile: 1.2.0
  - provisioning_api: 1.23.0
  - recommendations: 6.0.0
  - related_resources: 4.0.0
  - serverinfo: 5.0.0
  - settings: 1.16.0
  - sharebymail: 1.23.0
  - support: 5.0.0
  - survey_client: 5.0.0
  - systemtags: 1.23.0
  - tasks: 0.17.1
  - text: 7.0.0
  - theming: 2.8.0
  - twofactor_backupcodes: 1.22.0
  - twofactor_totp: 15.0.0
  - updatenotification: 1.23.0
  - user_status: 1.13.0
  - viewer: 6.0.0
  - weather_status: 1.13.0
  - webhook_listeners: 1.5.0
  - workflowengine: 2.15.0
Disabled:
  - app_api: 33.0.0 (installed 33.0.0)
  - encryption: 2.21.0
  - files_external: 1.25.1
  - suspicious_login: 11.0.0
  - testing: 1.23.0
  - twofactor_nextcloud_notification: 7.0.0
  - user_ldap: 1.24.0

The AIO Migration guide has some coverage of file/folder permissions/etc in scenarios such as this.

Thanks for linking this! I somehow missed or glanced over this page in my research. I think I did the “Migrate only the files method” in a roundabout way, but did not do step 6 to fix the permissions.

I am currently taking a backup so that I can easily restore my files in case I mess something up from this point forward, so I will try that when that is complete.

One question, would I run the commands in step 6 within the console of the nextcloud-aio-nextcloud container on my unRAID server, or would it be a different container/host server console?

Ok, after my backup, I ran steps 5-8 in the “Migrate only the files” portion of the linked guide, running the commands inside the ‘mastercontainer’ Docker.

Unfortunately, despite the commands all having ran successfully with no output or warnings, there is no change in behavior. Are there any other steps I can try?

I would recommend you compare old vs new directories - likely you will find differences
 you msut perform the compare inside/outside the container depending on how you copied/added your “old directories” as volume or bind mount.. otherwise post your compose file and ls -alR ${data_directory} from old/new directories (and explain where you are running the command)

the guide tells you to change permissions using a dedicated container.. I’m not into AiO - it might happen mastercontainer doesn’t even has access to the volume.