[Bug]: [AbMergeManager] Target directory is not writable #2342

Closed
opened 2026-04-25 00:06:17 +02:00 by adam · 9 comments
Owner

Originally created by @michbeck3000 on GitHub (Oct 31, 2024).

What happened?

I’m trying to convert an MP3 file to an M4B file using the Audiobook File Management Tools, but I’m running into a snag. The target directory is a Samba share that I can access through OMV. I created a Samba user with write permissions on the share, using the same user and credentials as my account in Audiobookshelf. But when I start the conversion, it stops with this error message: „M4B Failed! Target directory is not writable.“

What did you expect to happen?

I’m trying to get write permissions in OMV, but I’m not sure how. Can you help me out?

Steps to reproduce the issue

  1. Open the book in Audiobook File Management Tools
  2. Click on "Start M4B Encode"

Audiobookshelf version

2.16.2

How are you running audiobookshelf?

Other (list in "Additional Notes" box)

What OS is your Audiobookshelf server hosted from?

Linux

If the issue is being seen in the UI, what browsers are you seeing the problem on?

Safari

Logs

2024-10-31 14:41:15.476
INFO
[fileUtils] Directory is not writable "/media/Medien/Hörbücher/XXX/accessTest'] { errno: -13, code: 'EACCES', syscall: 'open', path: '/media/Medien/Hörbücher/XXX/accessTest' }
2024-10-31 14:41:15.476
ERROR
[AbMergeManager] Target directory is not writable: /media/Medien/Hörbücher/XXX
2024-10-31 14:41:15.477
INFO
[AbMergeManager] Removing task 110328f3-3c84-40a9-a7ea-7023782b4a7a

Additional Notes

Server hosted on Proxmox

Originally created by @michbeck3000 on GitHub (Oct 31, 2024). ### What happened? I’m trying to convert an MP3 file to an M4B file using the Audiobook File Management Tools, but I’m running into a snag. The target directory is a Samba share that I can access through OMV. I created a Samba user with write permissions on the share, using the same user and credentials as my account in Audiobookshelf. But when I start the conversion, it stops with this error message: „M4B Failed! Target directory is not writable.“ ### What did you expect to happen? I’m trying to get write permissions in OMV, but I’m not sure how. Can you help me out? ### Steps to reproduce the issue 1. Open the book in Audiobook File Management Tools 2. Click on "Start M4B Encode" ### Audiobookshelf version 2.16.2 ### How are you running audiobookshelf? Other (list in "Additional Notes" box) ### What OS is your Audiobookshelf server hosted from? Linux ### If the issue is being seen in the UI, what browsers are you seeing the problem on? Safari ### Logs ```shell 2024-10-31 14:41:15.476 INFO [fileUtils] Directory is not writable "/media/Medien/Hörbücher/XXX/accessTest'] { errno: -13, code: 'EACCES', syscall: 'open', path: '/media/Medien/Hörbücher/XXX/accessTest' } 2024-10-31 14:41:15.476 ERROR [AbMergeManager] Target directory is not writable: /media/Medien/Hörbücher/XXX 2024-10-31 14:41:15.477 INFO [AbMergeManager] Removing task 110328f3-3c84-40a9-a7ea-7023782b4a7a ``` ### Additional Notes Server hosted on Proxmox
adam added the bug label 2026-04-25 00:06:17 +02:00
adam closed this issue 2026-04-25 00:06:17 +02:00
Author
Owner

@michbeck3000 commented on GitHub (Nov 1, 2024):

The audiobookshelf command line lets me write and delete into the directory (with root permissions). In the UI my user is a root account, but the error is still there.

@michbeck3000 commented on GitHub (Nov 1, 2024): The audiobookshelf command line lets me write and delete into the directory (with root permissions). In the UI my user is a root account, but the error is still there.
Author
Owner

@mikiher commented on GitHub (Nov 1, 2024):

Can you provide a little more details about your setup?

  • You said the server is hosted on Proxmox - is it using the docker installation, the debian package, or built from source?
  • The directory you're trying to write to is I assume on some NAS? How exactly is the NAS mapped to /media?
  • You said "The audiobookshelf command line lets me write and delete into the directory". What exactly did audiobookkshelf write into that directory, and where? I'm asking because it makes little sense that audiobookshelf is able to write something into that directory but at the same time fail the isWritable test
@mikiher commented on GitHub (Nov 1, 2024): Can you provide a little more details about your setup? - You said the server is hosted on Proxmox - is it using the docker installation, the debian package, or built from source? - The directory you're trying to write to is I assume on some NAS? How exactly is the NAS mapped to /media? - You said "The audiobookshelf command line lets me write and delete into the directory". What exactly did audiobookkshelf write into that directory, and where? I'm asking because it makes little sense that audiobookshelf is able to write something into that directory but at the same time fail the `isWritable` test
Author
Owner

@michbeck3000 commented on GitHub (Nov 1, 2024):

ok, thanks for the reply. Here are some more information about my setup:

  • audiobookshelf is hosted on a Proxmox Server as Debian LXC (Debian package). As Backend for the files I use OpenMediaVault ("OMV", also on Proxmox as a virtual machine).
  • OMV provides a Samba share, which is mounted as a folder in audiobookshelf under /media
  • the connect between the browser UI and the OMV share works perfect in case of reading
  • at the command line (as "root") of the ABS server I'm able to write in the directory /media an the subfolders (create, change and delete is possible)
  • the account type of my user in ABS is "root", but if I try to write something into the samba share (i. e. cover images with "Store covers with item" or creating the m4b files) it fails
@michbeck3000 commented on GitHub (Nov 1, 2024): ok, thanks for the reply. Here are some more information about my setup: - audiobookshelf is hosted on a Proxmox Server as Debian LXC (Debian package). As Backend for the files I use OpenMediaVault ("OMV", also on Proxmox as a virtual machine). - OMV provides a Samba share, which is mounted as a folder in audiobookshelf under /media - the connect between the browser UI and the OMV share works perfect in case of reading - at the command line (as "root") of the ABS server I'm able to write in the directory /media an the subfolders (create, change and delete is possible) - the account type of my user in ABS is "root", but if I try to write something into the samba share (i. e. cover images with "Store covers with item" or creating the m4b files) it fails
Author
Owner

@mikiher commented on GitHub (Nov 1, 2024):

Ah, I see.

@advplyr, please correct me if I'm wrong, but I believe the debian audiobookshelf service does not run as root.
It creates an audiobookshelf user and group, and runs under those permissions. See here.

Try to setup write permissions for audiobookshelf

@mikiher commented on GitHub (Nov 1, 2024): Ah, I see. @advplyr, please correct me if I'm wrong, but I believe the debian audiobookshelf service does not run as root. It creates an `audiobookshelf` user and group, and runs under those permissions. See [here](https://github.com/advplyr/audiobookshelf/blob/master/build/debian/lib/systemd/system/audiobookshelf.service). Try to setup write permissions for `audiobookshelf`
Author
Owner

@michbeck3000 commented on GitHub (Nov 2, 2024):

OK, thanks mikiher!

I set up a smb-user named audiobookshelf with write permissions in OMV, but it did't work.
Do I have to create this user direct in Audiobookshelf as well?

@michbeck3000 commented on GitHub (Nov 2, 2024): OK, thanks mikiher! I set up a smb-user named `audiobookshelf` with write permissions in OMV, but it did't work. Do I have to create this user direct in Audiobookshelf as well?
Author
Owner

@mikiher commented on GitHub (Nov 2, 2024):

I'll try to help, but please understand that these permission issues have nothing to do with Audiobookshelf, and we cannot provide instructions on how to properly setup your network mounts.

Network mounts are usually set-up in /etc/fstab.
Can you check this file and see if your /media mount appears there?
If so, can you please copy the line here?

@mikiher commented on GitHub (Nov 2, 2024): I'll try to help, but please understand that these permission issues have nothing to do with Audiobookshelf, and we cannot provide instructions on how to properly setup your network mounts. Network mounts are usually set-up in `/etc/fstab`. Can you check this file and see if your `/media` mount appears there? If so, can you please copy the line here?
Author
Owner

@AnthonyTippy commented on GitHub (Dec 19, 2024):

Been having this same issue but with a generic smb network share that I host on proxmox as my primary NAS.

Set up audiobookshelf (both ubuntu and docker builds) according to the documentation. Mounted my share in a similar spot to you /mnt/share

I can get audiobookshelf to read but anytime I try to update a cover or anything thats write perm related it fails. I finally gave up but I'd love to get it working if you figured it out @michbeck3000

@AnthonyTippy commented on GitHub (Dec 19, 2024): > Been having this same issue but with a generic smb network share that I host on proxmox as my primary NAS. Set up audiobookshelf (both ubuntu and docker builds) according to the documentation. Mounted my share in a similar spot to you `/mnt/share` I can get audiobookshelf to read but anytime I try to update a cover or anything thats write perm related it fails. I finally gave up but I'd love to get it working if you figured it out @michbeck3000
Author
Owner

@michbeck3000 commented on GitHub (Dec 21, 2024):

I use Openmediavault NAS as a Virtual Machine an audiobookshelf as LXC, both in Proxmox. Write permissions are ok at my side. So my setup seems different to yours @AnthonyTippy, I'm afraid I can't help you with that.
@mikiher: Thank you for trying to help me with this issue, but I gave up to fix this. Now I transcode audiobooks outside of audiobookshelf.

@michbeck3000 commented on GitHub (Dec 21, 2024): I use Openmediavault NAS as a Virtual Machine an audiobookshelf as LXC, both in Proxmox. Write permissions are ok at my side. So my setup seems different to yours @AnthonyTippy, I'm afraid I can't help you with that. @mikiher: Thank you for trying to help me with this issue, but I gave up to fix this. Now I transcode audiobooks outside of audiobookshelf.
Author
Owner

@mikiher commented on GitHub (Dec 21, 2024):

@AnthonyTippy again, I can try to help here.

  1. You said you tried "both ubuntu and docker builds". I assume the host on which the audiobookhelf server is hosted is an Ubuntu machine, right? To simplify, let's stick with one type of install, the Debian pacakge.
  2. How did you mount your SMB share?
  3. Can you please check if the share appears in /etc/fstab, and copy the line here?
@mikiher commented on GitHub (Dec 21, 2024): @AnthonyTippy again, I can try to help here. 1. You said you tried "both ubuntu and docker builds". I assume the host on which the audiobookhelf server is hosted is an Ubuntu machine, right? To simplify, let's stick with one type of install, the Debian pacakge. 2. How did you mount your SMB share? 3. Can you please check if the share appears in /etc/fstab, and copy the line here?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#2342