Docker / NPVR permission issue

Hi Folks,

i am having some permission issue with NextPVR running inside docker. it is preventing me running a Kodi back up (Backup hangs when backing up kodi\userdata\addon_data\service.system.docker), but other than that NPVR is working just fine. i have faced this issue before (i think ungraceful shutdown is what cause it), and to overcome i uninstall docker, but it only partially uninstalls the user data, as this is where the permission issue is. I then have to clean up by deleting all the ‘leftovers’ by connecting with ssh as root and deleting that way (i get permission issue if i try to delete over smb). i then reinstall docker and then NPVR, and Kodi backup is working again.

I don’t want to do that this time as NPVR has dropped a feature that is important to me, so want to stay on the older image, i already checked with the NPVR developer and he cannot provide an older image, if i re-install it will only be with latest image, and he has no plans to add the feature back in.

is there some command i can run over ssh against the kodi\userdata\addon_data\service.system.docker folder that will fix the permissions and allow files to be copied / kodi back up ran?


Docker NextPVR works in its own virtual world that is different from the world of Kodi, which works on the CoreELEC host. Don’t be surprised if you have problems.

What can you do?:

  • Run the NextPVR container for the root user.
  • Match the ‘storage’ directory on both worlds, and, if necessary, match the ‘media’ directory as well.
  • Run the backup script only on the CoreELEC host. You shouldn’t have any problems, on my LE server I have fifteen docker services installed (almost all, but not all, run as root) and backups run automatically as normal.

I recently replaced my acestream docker service with an older one and the new backup resulted in a 10GB increase in size. I obviously ditched the new docker service for the one I previously used because it always worked fine with a reasonable backup size. The same thing may be happening to you and you think that your backup is not working due to the depletion of storage space.

In short, it is difficult to give advice, study your problem and find the solution yourself.

thanks for the prompt rely. i dont think the issue is due to larger back up size, i have the newer image on another corelec box and that backs up just fine, and the image that fails to back up, used to back up just fine, but after a power blip the permissions seem to be messed up on the dockers userdata folder. i can copy off the files when logged in a root i guess, just more time consuming than launching the back up app and selecting backup.

for back up i am using the Kodi backup add on, so it is running locally on the CE host, but as noted it hangs on the problem folder on this box specifically. is there a way to force kodi back up addon to run as ‘root’ or is it supposed to run like that anyway?. its odd the back up app does not have permission, but when logged in as root on ssh there is no permission issue i can see and i can delete or copy the files in that folder.

Check the installation information of your container.

For ‘root’ I use the parameters:

-e PUID=0
-e PGID=0


–user 0:0

I’m sorry, I can’t help you with the ‘Backup’ addon, I don’t use it because it gave me problems (I couldn’t recover the backups) years ago and I stopped using it.

Sounds like permission issues to me. There is a short wiki entry about docker but you best bet would be to ask in the docker forum. Links are in the wiki.

NextPVR (NPVR is a confusing name for me) can also be installed directly as a addon zip install in CE19 builds if you are interested. I am not sure how the backup system works with open files but it is installed in /storage and it does make it to the tar file.


Thanks everyone…
@cubimol not sure how i would use those commands or to understand any output from them, as don’t really use linux much, only for CE, a retro hadnheld for ES and an arm bian install i have on an old droid box, that i only really set up to see if i could get it to work and have a way of accessing linux file systems from CE and my handheld

@Betatester i will check on the docker forum

@emveepee installing as an addon on 19 sounds interesting, and would like to check that out, however, for the issue i am having with backing up, it is on a legacy Leia build - i repurposed a couple of old s912 boxes to be back ends, and they work really well, but since some power issues (underfloor heating in the bathroom kept tripping the circuit / ring main) the permissions seem to have been messed up on the containers in my docker and i cant back up with Kodi backup addon any more, or manually copy in smb after stopping docker. both ways to back up used to work well until i had a spate of ungraceful power downs when the circuits were tripping…

So i have finally been able to take a decent backup!!! still not got past the permission issue with the backup add on, however, i noticed CE has its own back up in CE settings. This worked for me, and i have tested by copying the tar file to another box and restoring. Everything worked great on the other box and NextPVR came up no issue. Added bonus that it backed up / restored my settings outside of Kodi also, so my mount points and cron jobs all came over with the back up too. Pretty nifty!

I thought you might find this interesting: CoreELEC backup tool

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