I had a lot of issues getting m4b-tool to be able to write the generated m4b back to the host system under podman.
It turns out you need --userns=keep-id option when running the container. Suggest this alias
alias m4b-tool='podman run -it --rm --userns=keep-id -v "$(pwd)":/mnt sandreas/m4b-tool:latest'
Without this I was always getting the following permission denied error:
PHP Warning: rename(fragments.m4b): Failed to open stream: Permission denied in phar:///usr/local/bin/m4b-tool-pre/src/library/Command/MergeCommand.php on line 967
PHP Warning: rename(/tmp/m4b-tool/tmp_fragments.m4b,fragments.m4b): Permission denied in phar:///usr/local/bin/m4b-tool-pre/src/library/Command/MergeCommand.php on line 967
Could not rename output file from /tmp/m4b-tool/tmp_fragments.m4b to fragments.m4b
an error occured, that has not been caught:
Array
(
[type] => 2
[message] => rename(/tmp/m4b-tool/tmp_fragments.m4b,fragments.m4b): Permission denied
[file] => phar:///usr/local/bin/m4b-tool-pre/src/library/Command/MergeCommand.php
[line] => 967
)
I'm putting this here in case it helps anyone.
I had a lot of issues getting m4b-tool to be able to write the generated m4b back to the host system under podman.
It turns out you need
--userns=keep-id
option when running the container. Suggest this aliasWithout this I was always getting the following permission denied error: