.json temporary options files created by mkvtoolnix-gui cannot be read by mkvmerge
- PureOS Byzantium (aka Debian Bullseye) on amd64
- gnome 3.38.5 / wayland
- mkvtoolnix 74.0.0-0~debian11bunkus01
- mkvtoolnix-gui 74.0.0-0~debian11bunkus01
When I start mkvtoolnix-gui
I get the following message in a window titled "Problem with MKVToolNix installation":
A problem has been detected with this installation of MKVToolNix:
* The version line reported by mkvmerge ('Error: The file '/tmp/MKVToolNix-process-NqOwmP.json' could not be opened for reading: open file error.') could not be recognized.
Certain functions won't work correctly in this situation. Please re-install MKVToolNix or fix the problem manually.
Looking for the cause for this message I ended up replacing mkvmerge by a bash script to show me information about the file passed to mkvmerge
as @<FILE>
and found this as output of ls -l
:
---------- 1 myuser mygroup 17 10. Mär 22:28 /tmp/MKVToolNix-process-FwagiQ.json
I then called from the bash script the renamed binary of mkvmerge
after a chmod 600
on the .json file and the error message didn't appear.
Looking at the code I found that the .json file is created in util/option_file.cpp
by a function called OptionFile::createTemporary
. I looked around to find a reason why this function would create a file without any permissions, but I'm not a programmer and couldn't find any reason why this would happen on my system.
I checked umask and found
someuser@pureos:~/tmp/mkvtoolnix$ umask
0022
which I thought would be o.k.
I tried to compile the software from the debian source package, but that didn't help with the issue. My compiled version behaved exactly like the downloaded binary package. The package from the Debian Repos mkvtoolnix=54.0.0+really52.0.0-3
and mkvtoolnix-gui=54.0.0+really52.0.0-3
show exactly the same issue.
Any help to find out if the file permissions on the .json are really the reason why the software doesn't work on my system and if so why the .json files are created without any permissions would be very welcome!