m4b-tool icon indicating copy to clipboard operation
m4b-tool copied to clipboard

podman permission denied error. suggested alias for running m4b-tool with podman

Open jasonblewis opened this issue 1 year ago • 1 comments

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 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
)

jasonblewis avatar Mar 07 '24 23:03 jasonblewis

Thanks, I'm going to transfer this in the official docs.

sandreas avatar Mar 08 '24 07:03 sandreas