[Bug]: Unable to change main library location to a subfolder of original directory #314

Closed
opened 2026-04-24 23:04:31 +02:00 by adam · 2 comments
Owner

Originally created by @DDriggs00 on GitHub (Apr 27, 2022).

Describe the issue

When attempting to set the main library to be a subdirectory of it's original location, it causes a crash without adding anything to the log. Changing it to other directories, such as /media, works without issues.

Steps to reproduce the issue

  1. Setup a new docker container with no existing data or configuration
  2. Link /audiobooks in the docker container to a directory containing multiple subdirectories (e.g. /library1), each of which includes a structured audiobook library
  3. Under Config -> Libraries, edit the Main library
  4. Since editing paths is impossible at this point, add /audiobooks/library1 as a path, and remove /audiobooks
  5. When clicking save, the server will crash, which will be exhibited by the client showing a socket disconnect error.

Audiobookshelf version

v2.0.3

How are you running audiobookshelf?

Docker

Originally created by @DDriggs00 on GitHub (Apr 27, 2022). ### Describe the issue When attempting to set the main library to be a subdirectory of it's original location, it causes a crash without adding anything to the log. Changing it to other directories, such as `/media`, works without issues. ### Steps to reproduce the issue 1. Setup a new docker container with no existing data or configuration 2. Link `/audiobooks` in the docker container to a directory containing multiple subdirectories (e.g. `/library1`), each of which includes a structured audiobook library 3. Under Config -> Libraries, edit the `Main` library 4. Since editing paths is impossible at this point, add `/audiobooks/library1` as a path, and remove `/audiobooks` 5. When clicking save, the server will crash, which will be exhibited by the client showing a socket disconnect error. ### Audiobookshelf version v2.0.3 ### How are you running audiobookshelf? Docker
adam added the bug label 2026-04-24 23:04:31 +02:00
adam closed this issue 2026-04-24 23:04:32 +02:00
Author
Owner

@DDriggs00 commented on GitHub (May 9, 2022):

I figured out the problem: When adding or removing paths from a library, abs sets permissions on the path. With a read-only library, this causes a crash.

@DDriggs00 commented on GitHub (May 9, 2022): I figured out the problem: When adding or removing paths from a library, abs sets permissions on the path. With a read-only library, this causes a crash.
Author
Owner

@advplyr commented on GitHub (May 20, 2022):

Fixed in v2.0.15

Should work fine with a read-only library as long as the folders exist first.

@advplyr commented on GitHub (May 20, 2022): Fixed in [v2.0.15](https://github.com/advplyr/audiobookshelf/releases/tag/v2.0.15) Should work fine with a read-only library as long as the folders exist first.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#314