Search code examples
dockerjitsi

Jibri returns the error java.nio.file.AccessDeniedException but the directory has read write permissons for root everyone and groups


This is the trace of the error. It is a jibri instance connected to a jitsi-meet prosidy server that always fails to create the recording directory and then writing to a file that will save the recording. Creating the directory myself does not fix the problem and it still persists to fail in this way. The ffmpeg has no logs to recover.

FileUtilsKt.createIfDoesNotExist#28: Error creating directory java.nio.file.AccessDeniedException: /run/s6/services/40-jibri/~ at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:90) at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116) at java.base/sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:389) at java.base/java.nio.file.Files.createDirectory(Files.java:690) at java.base/java.nio.file.Files.createAndCheckIsDirectory(Files.java:797) at java.base/java.nio.file.Files.createDirectories(Files.java:783) at org.jitsi.jibri.util.FileUtilsKt.createIfDoesNotExist(FileUtils.kt:26) at org.jitsi.jibri.service.impl.FileRecordingJibriService.start(FileRecordingJibriService.kt:153) at org.jitsi.jibri.JibriManager.startService$lambda-2(JibriManager.kt:239) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829)

This is the image of the directory that should hold be accessed:

enter image description here

I am relatively new to jitse and docker. What context am I missing in this configuration??

I tried updating all the directories and making the read writeable. I know that the volume is bound mounted with docker and the logs reflect in the folder but for some odd reason the the file recorder is not allowed to write anything to the folder. An image of the file system on docker reflecting the bound volume


Solution

  • The solution was right in front of my eyes. I was referring to a my own host machines directory from the config that is not file permission issue. I setup which was incorrect there is a bind mount setup on docker engine that refers to right config so that docker build should work. so I just needed to refer to the right path /config/recorder where the config file leaves and that's the solution.