Permission denied on all files when trying to perform a backup

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):
    • 31.0.9
  • Operating system and version (e.g., Ubuntu 24.04):
    • Debian 12 on Raspberry 4
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • When clicking on "create backup"
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • Nextcloud-AIO through docker

Summary of the issue you are facing:

I selected a folder on my system which is next to the one I have to store my nextcloud data (that is on a drive connected through USB to my PI) as a backup from the Nextcloud AIO interface.

Then I tried to create a backup through the interface. You will see th elogs below, i tried to have the destination directory owned by www-data and i also tried chmod 777, still having permission issue.

Any idea ?

Steps to replicate it (hint: details matter!):

  1. setup backup directory

  2. create backup

Log entries

Nextcloud

Logs from backup :

2025-10-20T10:59:32.096333731Z Performing backup...
2025-10-20T10:59:32.096968482Z Starting the backup...
2025-10-20T10:59:34.242403359Z Creating archive at "/mnt/borgbackup/borg::20251020_105932-nextcloud-aio"
2025-10-20T10:59:37.099992266Z /nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/nextcloud.log: extended stat (ACLs): [Errno 13] Permission denied: '/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/nextcloud.log'
2025-10-20T10:59:37.101622708Z /nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/index.html: extended stat (ACLs): [Errno 13] Permission denied: '/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/index.html'
2025-10-20T10:59:37.148847071Z /nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/admin/files/Photos/Gorilla.jpg: extended stat (ACLs): [Errno 13] Permission denied: '/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/admin/files/Photos/Gorilla.jpg'
2025-10-20T10:59:37.151483166Z /nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/admin/files/Photos/Readme.md: extended stat (ACLs): [Errno 13] Permission denied: '/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/admin/files/Photos/Readme.md'
2025-10-20T10:59:37.183747633Z /nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/admin/files/Photos/Vineyard.jpg: extended stat (ACLs): [Errno 13] Permission denied: '/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/admin/files/Photos/Vineyard.jpg'
2025-10-20T10:59:37.235080887Z /nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/admin/files/Photos/Birdie.jpg: extended stat (ACLs): [Errno 13] Permission denied: '/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/admin/files/Photos/Birdie.jpg'
2025-10-20T11:14:17.429145802Z /nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/files_encryption/OC_DEFAULT_MODULE/pubShare_b70da923.publicKey: extended stat (ACLs): [Errno 13] Permission denied: '/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/files_encryption/OC_DEFAULT_MODULE/pubShare_b70da923.publicKey'
2025-10-20T11:14:17.454428779Z /nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/files_encryption/OC_DEFAULT_MODULE/pubShare_b70da923.privateKey: extended stat (ACLs): [Errno 13] Permission denied: '/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/files_encryption/OC_DEFAULT_MODULE/pubShare_b70da923.privateKey'
2025-10-20T11:14:17.472710998Z /nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/files_encryption/OC_DEFAULT_MODULE/master_b70da923.publicKey: extended stat (ACLs): [Errno 13] Permission denied: '/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/files_encryption/OC_DEFAULT_MODULE/master_b70da923.publicKey'
2025-10-20T11:14:17.486103709Z /nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/files_encryption/OC_DEFAULT_MODULE/master_b70da923.privateKey: extended stat (ACLs): [Errno 13] Permission denied: '/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/files_encryption/OC_DEFAULT_MODULE/master_b70da923.privateKey'
2025-10-20T11:14:17.489260833Z /nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/.ncdata: extended stat (ACLs): [Errno 13] Permission denied: '/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/.ncdata'
2025-10-20T11:14:17.492688139Z /nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/.htaccess: extended stat (ACLs): [Errno 13] Permission denied: '/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/.htaccess'
2025-10-20T11:14:17.494845870Z /nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/skip.update: extended stat (ACLs): [Errno 13] Permission denied: '/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/skip.update'
2025-10-20T11:17:39.960704009Z ------------------------------------------------------------------------------
2025-10-20T11:17:39.967970098Z Repository: /mnt/borgbackup/borg
2025-10-20T11:17:39.967999024Z Archive name: 20251020_105932-nextcloud-aio
2025-10-20T11:17:39.968010190Z Archive fingerprint: 0cc4cd9498388a5a642ef308142fa79fc84e607a407f03b0683aa71bff9b308d
2025-10-20T11:17:39.968020745Z Time (start): Mon, 2025-10-20 10:59:34
2025-10-20T11:17:39.968030431Z Time (end):   Mon, 2025-10-20 11:17:35
2025-10-20T11:17:39.968039949Z Duration: 18 minutes 1.22 seconds
2025-10-20T11:17:39.968049412Z Number of files: 43235
2025-10-20T11:17:39.968058689Z Utilization of max. archive size: 0%
2025-10-20T11:17:39.968068523Z ------------------------------------------------------------------------------
2025-10-20T11:17:39.968078448Z                        Original size      Compressed size    Deduplicated size
2025-10-20T11:17:39.968088170Z This archive:               12.44 GB             11.34 GB             11.28 GB
2025-10-20T11:17:39.968098152Z All archives:               12.44 GB             11.34 GB             11.28 GB
2025-10-20T11:17:39.968107781Z 
2025-10-20T11:17:39.968118115Z                        Unique chunks         Total chunks
2025-10-20T11:17:39.968128207Z Chunk index:                   43105                46914
2025-10-20T11:17:39.968137966Z ------------------------------------------------------------------------------
2025-10-20T11:17:40.661150122Z Deleting the failed backup archive...
2025-10-20T11:17:49.098126448Z ------------------------------------------------------------------------------
2025-10-20T11:17:49.098219928Z                        Original size      Compressed size    Deduplicated size
2025-10-20T11:17:49.098321797Z Deleted data:               -1.54 GB           -448.70 MB           -392.30 MB
2025-10-20T11:17:49.098382556Z All archives:                    0 B                  0 B             10.88 GB
2025-10-20T11:17:49.098494869Z 
2025-10-20T11:17:49.098560683Z                        Unique chunks         Total chunks
2025-10-20T11:17:49.098656441Z Chunk index:                    9494                 9555
2025-10-20T11:17:49.098732533Z ------------------------------------------------------------------------------
2025-10-20T11:17:49.267458363Z Backup failed!
2025-10-20T11:17:49.267533733Z You might want to check the backup integrity via the AIO interface.

I did try a backup check as requested, here are the logs :

2025-10-20T09:34:01.551659268Z Checking the backup integrity...
2025-10-20T09:34:03.567623137Z Starting repository check
2025-10-20T09:36:17.827018883Z finished segment check at segment 46
2025-10-20T09:36:17.929235692Z Starting repository index check
2025-10-20T09:36:17.929311524Z Index object count match.
2025-10-20T09:36:17.947377951Z Finished full repository check, no problems found.
2025-10-20T09:36:17.947831075Z Starting archive consistency check...
2025-10-20T09:36:18.104290015Z Starting cryptographic data integrity verification...
2025-10-20T09:43:33.909175340Z Finished cryptographic data integrity verification, verified 9495 chunks with 0 integrity errors.
2025-10-20T09:43:33.939405328Z 9494 orphaned objects found!
2025-10-20T09:43:33.942719284Z Archive consistency check complete, problems found.
2025-10-20T09:43:34.630711206Z Some errors were found while checking the backup integrity!
2025-10-20T09:43:34.630803261Z Check the AIO interface for advice on how to proceed now!

So i tried to repair it. See logs :

2025-10-20T10:00:25.446360174Z Checking the backup integrity and repairing it...
2025-10-20T10:00:27.423977199Z This is a potentially dangerous function.
2025-10-20T10:00:27.424094327Z check --repair might lead to data loss (for kinds of corruption it is not
2025-10-20T10:00:27.424106568Z capable of dealing with). BE VERY CAREFUL!
2025-10-20T10:00:27.424113753Z 
2025-10-20T10:00:27.424406453Z Type 'YES' if you understand this and want to continue: Starting repository check
2025-10-20T10:02:42.679368619Z finished segment check at segment 46
2025-10-20T10:02:42.810024629Z Starting repository index check
2025-10-20T10:02:42.937795453Z Finished full repository check, no problems found.
2025-10-20T10:02:42.938239466Z Starting archive consistency check...
2025-10-20T10:02:43.131022031Z 9494 orphaned objects found!
2025-10-20T10:02:43.131103233Z Deleting 9494 orphaned and 0 superseded objects...
2025-10-20T10:04:01.506822524Z Finished deleting orphaned/superseded objects.
2025-10-20T10:04:01.508891016Z Writing Manifest.
2025-10-20T10:04:01.569679642Z Committing repo.
2025-10-20T10:04:01.724082563Z Archive consistency check complete, problems found.
2025-10-20T10:04:02.481070584Z Check finished successfully on 20.10.2025 - 10:04:02 (00 hours 03 minutes 37 seconds).

Well how do you start the Backup?
No command (like rsync) to start the backup visible here!

Edit: if you are using the NC-App “Backup” its only avilable for 23 → 28. You use NC 31. So its untested for NC 31 and not remommended to be used with NC31

I start it clicking on the button on the Nextcloud AIO “container” interface.

AIO is a Docker Container. Docker has in general restricted access to the Host-Computers filessystem. But since i don’t use Docker, i can’t give your more details

1 Like

I’ve been thinking last night and since I’ve confirmed that the backup container is working as root user. Maybe it has something to do with file system ? Nextcloud data and backup are located on a hard drive that, after verification, has a “fuseblk” file system, I will try this week to change to something like ext4.

“fuseblk” is NOT a file system !!!

Fuse = Filesystem on userspace. A “fuseblk” simply indicates that it is a block device in userspace. It tells you nothing about the target file system.

ok, I’ve seen on the internet that I had to type “df -Th” and i’ve seen fuseblk so I thought it was that. Sorry i’m kind of a beginner :confused: . It might be ntfs which could be the problem

Yes indeed. NTFS has very different File-owner and read/write Permissions as Linux File Systems (like ext4). You can mount and simulate those for Linux-Systems. There are older and newer Kernel-Modules for that. But default permissions are even differen betrween ntfs-3g and ntfs3. So you better should knnow what you do.

So better you use a native Linux File-System for backup. But that means you need to reformat the Drive and wiill lost all current files on it. And also you can’t do that on a Windows OS. Windows does not support out of the Box ext4.

If your Pi4 has a graphical Desktop, like Gnome, xfce, you will be able to use gparted for that on the Pi.

Yes I can plug the Raspberry on a monitor so I can use the GUI, will look into gparted. Do you know if it is possible de copy the data on another drive, change the file system to ext4, then copy back the data ? I’m a bit confused by the file system elements and what it really does. Thank you very much for your help.

If gparted is not installed by default you can install it via

apt-get update
apt-get install gparted

Yes, sure. It depends somewhat on the type of Data. If on the drive is also a Backup of your current Windows-Machine, the data better stay on NTFS-Filesystem. As i told you before, Windows can’t read ext4 out of the box. There are tools available for that but its not wise to restore a backup from another filesystem. The permissions of the files will be destroyed.

But if there lets say only mp3, Photos or Video files or some pdf’s on the Drive you can do whatever you want.

So what you wisely will do is depending on what you currently have.

Nope the HDD serves only as a dedicated NAS/Private cloud so I will change the file system I guess. will keep you posted.

update : after using gparted and changing the file system to ext4 the backup worked. thanks again !

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.