Permissions in the Files/Folders
What happened?
As a power user, I often run into things that the web interface cannot do. When that happens, I like to make the necessary changes directly in the files.
ExampleI recently mass-imported chapter timestamps using ChatGPT. I converted:
0:00:00 - first chapter
0:24:27 - chapter the seconddirectly into the relevant JSON file.
Problem
My Unraid user has access to the media share (write access for the Admin user), where the Audiobooks folder contains all of my Audiobookshelf data.
However, files created by Audiobookshelf are owned by root:root with permissions such as:
-rw-r--r-- 1 root rootThis prevents me from modifying the files directly through the share.
As a workaround, I currently have to manually fix the permissions from the server terminal:
chown -R root:users .
find . -type f -exec chmod 664 {} \;If I also need to create files or folders, I have to update the directory permissions as well:
find . -type d -exec chmod 775 {} \;This becomes particularly inconvenient after new files are created/imported.
What did you expect to happen?
I would suggest changing the default permissions/ownership used when Audiobookshelf creates files and directories.
For example:
Files:
-rw-rw-r-- root usersDirectories:
-rwxrwxr-x root usersIn other words:
- Files:
664 - Directories:
775 - Group:
users
This would allow users who have access to the underlying storage to modify Audiobookshelf's files without having to manually repair permissions after every import or upload.
Steps to reproduce the issue
Connect to the Audiobooks folder through the network share.
Use Audiobookshelf's built-in upload/import functionality to create a file.
On the server, inspect the resulting file with
ls -laObserve that the file is owned by
root:rootand does not have group-write permissions.
Audiobookshelf version
v2.35.1
How are you running audiobookshelf?
Docker
What OS is your Audiobookshelf server hosted from?
Other (list in "Additional Notes" box)
If the issue is being seen in the UI, what browsers are you seeing the problem on?
None
Logs
Additional Notes
OS: Unraid
Source: advplyr/audiobookshelf